2021-03-19 05:20 PM
Hi
I wish to display two variables on a line graph.
I create the graph in the TouchGFX deigner with Line1 and Line 2.
However I cannot work out how to set add points to the graph.
I used the method:
/**************************************************************/
void Screen1View::handleTickEvent()
{
tickCounter++;
// Insert each second tick
if (tickCounter % 3 == 0)
{
float yMax = graph1.getGraphRangeYMaxAsFloat();
// Insert "random" points along a sine wave
graph1.addDataPoint((int)(Detector_Y.NormOp * 50 + 50));
}
}
In my Screen1View.cpp file, but it adds the same point to both lines.
There doesn't seem to be a method that adds points to the graph elements.
How do I do this?
Do I need two seperate graph widgets overlayed?
Best regards
Rob
2021-03-20 01:34 AM
Do I need two seperate graph widgets overlayed?
I mean yes
2021-04-27 11:57 AM
It's just unrealistically weird! Why is there no functionality that allows drawing many trends on one chart ?!
Developers, overlapping widgets are crutches, and we (users) are not disabled!
2021-04-27 12:00 PM
If sometime this functionality is added (if it is not ..), please throw a sneaker at me! =)
2021-04-27 12:25 PM
Maybe you can write your own code for this. Previous versions dont have any graphs...
Example code STM32CubeF7/Graph.hpp at master · STMicroelectronics/STM32CubeF7 · GitHub
2021-04-27 12:42 PM
Thanks for the lightning fast response.
I am a noob and I hardly have the ability to write one of the modules of such a large development environment with high quality ..
Thanks a lot for the link, I didn't know that ST is on the github!
They use version TouchGFX 4.10.0 in the examples. I have version TouchGFX 4.16.0 . Everything has changed a lot ... I hope that in the new version everything will not change so much ..
2021-04-28 12:37 AM
Hi,
Could you add this idea to the Idea Zone of this forum ? This will help us keep track of this :thumbs_up: .
/Romain
2021-04-28 01:08 PM
I added this idea to the Idea Zone ("Add the ability to draw several elements on one chart (for example, 6 trend lines)").
2021-04-28 01:15 PM
Hi,
I added this idea to the Idea Zone ("Add the ability to draw several elements on one chart (for example, 6 trend lines)"). Thanks for your feedback!
2024-03-11 07:10 PM
@Romain DIELEMAN I wonder if this feature has been added yet