Page 1 of 1

gui element x/y position ++ graph element

Posted: Tue Jul 31, 2018 10:25 pm
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.

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

Posted: Wed Aug 01, 2018 5:39 pm
by Rseding91
I can add support for the Graph GUI element. The GUI system Factorio uses does not support margins - only padding.

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

Posted: Wed Aug 01, 2018 7:22 pm
by ownlyme
a graph element would be really awesome!
thank you

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

Posted: Tue May 07, 2019 8:41 am
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?

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

Posted: Wed May 08, 2019 7:05 pm
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 2077 times

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

Posted: Thu May 09, 2019 7:40 pm
by Therenas
Looks rather nice, actually.

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

Posted: Thu May 09, 2019 7:46 pm
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.

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

Posted: Fri May 10, 2019 6:48 am
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.