2021-09-14 03:51 AM
Can TouchGFX devs please create a widget that will let you plot multiple data sets on the same graph? It would be a really useful feature, I had a go at creating my own and I found it incredibly difficult to develop as it requires a significant knowledge of the internals of TouchGFX to perform.
2021-09-14 04:03 AM
Current (4.16 and 4.17) DynamicGraph already can do it. Simply add as many lines as you need.
2021-09-14 04:06 AM
I am using 4.17, when I add a value it will only plot that singular value. I need different Y values on the same X point with different line styles. For example like this:
2021-09-14 05:18 AM
Exactly. Add extra lines in designer. Name them like graph2, graph3 and so on and then in your code call:
graph.AddPoint( y );
graph2.AddPoint( y2 );
graph3.AddPoint( y3 );
and so on...
My example has 2 graph: yellow is sinewave with some random noise and blue is slider value.
2021-09-14 05:21 AM
The only limitation - graphs should have same number of points on X (horizontal) axis. Otherwise they could be unsynchronized. In other words you should add new points to all graphs at the same time. No "holes" are allowed.
2021-09-14 05:29 AM
Oh okay so you have to overlay graphs at the moment and you cannot just add new Elements to store points into?