Wow! Those charts are impressive, Desmanto! My weather widget would have had way less shapes, yet I wasn't so brave to build itdigitalstone wrote:I have similar plans for these kind of graphs, yet i'm not starting on that kind of widget building since i can already see the unbelievable amount of clutter hanging about.Desmanto wrote:Having more element choices would be nice. I have to struggled to create a graph for my next flow. But It is very nice to know that we can do it already using currently what Automagic has. I created graph from the rectangles.This is a widget consist of 4 graphs, to show 4 signal properties from my wifi modem. I am going to use it to check the best position for the modem, to get the maximum achievable speed. It consists of 4 x 100 loops to update the whole data and several texts there. The widget itself is about 800 Kb!!! Consists of 400+ elements (while my total flows.xml only just above 1 MB). The graphs shown above still use dummy data I generated from random number, thus still sporadic (not smooth). Single loop execution require about 600-800 ms to finish, and I use a sleep about 200-400 ms to make it update per second.
If we can have "Graph" element, which feed on input with list type, I don't need to loop for those 400 loops anymore, which will make the execution faster. The graph can be adjusted with how many elements it has (in my case it is 100), so the input must be 100 elements too (or autofill blank elements to 100). There will be max and min value and the length of the x y axis to plot the graph.
This is not critical, because I only find one or two usage from this kind of widget.
Rectangles (shapes in general) can't be dynamically created, and i think there is something "unclean" about that.
About the boolean thing: I think a single boolean function could, for now potentially, exponentially increase the amount of possibilities of shapes you can create.
Digitalstone, you have a point here, we should also wish for the ability to add shapes to the widget dynamically. I'm still not sure how a boolean method would help. I believe the engine would have to apply that boolean logic every time the widget is rendered/refreshed in order to display the resulting shape. It would be more difficult for the underlying code to determine when the final shape has to change. If the primitives are controlled solely by sets of 2D points and math, it would be much easier to implement and much faster to execute.