gui element x/y position ++ graph element

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 401
Joined: Thu Dec 21, 2017 8:02 am
Contact:

gui element x/y position ++ graph element

Post by ownlyme »

graph element:
It would be nice if we had a gui element for graphs, like the one you are using for the electricity network
i suggest it would have the properties value (table with value assignments x->y), min value (lower end of the scale), max value (upper end of the scale), color and line thickness.
the modder could simply lay multiple graphs over each other to have multiple displayed in the same box, or maybe you could make it possible to display multiple in the same element, which is probably the only way to make colors blend

element x/y position
i think the gui elements are also missing a property to set the margin of an element, or x/y position in the parent element if it's possible with the current flow system.

i tried recreating the graph with 2 different approaches
1. i used progressbars for the dots, but even an 80x50 table full of dots uses so much graphics performance that the game really starts lagging when there are 4 on the screen.
2. still progressbars for the dots, but flow elements to space them vertically, but changing the minimal height of those 400 elements of only a single table slows down the cpu side of the game by at least 2 ticks.
Attachments
dots.png
dots.png (7.61 KiB) Viewed 2363 times
Last edited by ownlyme on Wed Aug 01, 2018 7:30 pm, edited 1 time in total.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Rseding91
Factorio Staff
Factorio Staff
Posts: 14071
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: gui element x/y position ++ graph element

Post by Rseding91 »

I can add support for the Graph GUI element. The GUI system Factorio uses does not support margins - only padding.
If you want to get ahold of me I'm almost always on Discord.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 401
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: gui element x/y position ++ graph element

Post by ownlyme »

a graph element would be really awesome!
thank you
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: gui element x/y position ++ graph element

Post by eduran »

Rseding91 wrote:
Wed Aug 01, 2018 5:39 pm
I can add support for the Graph GUI element. The GUI system Factorio uses does not support margins - only padding.
Any chance of this happening?

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: gui element x/y position ++ graph element

Post by eduran »

Be warned: if the API does not expose graphs I am going to abuse existing elements :twisted:
graph.JPG
graph.JPG (41.94 KiB) Viewed 2076 times

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 249
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: gui element x/y position ++ graph element

Post by Therenas »

Looks rather nice, actually.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14071
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: gui element x/y position ++ graph element

Post by Rseding91 »

When I do get around to exposing the graph GUI element: it's not going to do what you're doing in those examples. It only does what you see in the production stats GUI.
If you want to get ahold of me I'm almost always on Discord.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: gui element x/y position ++ graph element

Post by eduran »

Rseding91 wrote:
Thu May 09, 2019 7:46 pm
When I do get around to exposing the graph GUI element: it's not going to do what you're doing in those examples. It only does what you see in the production stats GUI.
Exactly what I am looking for, just with a different y axis. The bar graph in my screenshot also does that, but not as nice looking and with a high-ish performance impact.
Therenas wrote:
Thu May 09, 2019 7:40 pm
Looks rather nice, actually.
Thanks. While I am quite happy with the looks, the number of different GUI elements that combine into one graph and need to be updated all the time make it far from ideal.

Post Reply

Return to “Modding interface requests”