2024-06-06 06:53 AM
Hello:
I am looking for a fast way to add an array of data to a static graph without adding them one point at a time using addDataPoint(). I also don't care about the x values. They are just sequential. I want to update the entire graph at once and then refresh the display. Is there a way to do this?
Thanks,
Dan
Solved! Go to Solution.
2024-06-28 06:05 AM
Hello @DWWelch ,
Unfortunately, there are no current solutions for your described behavior. However, as @JTP1 has pointed it out, you are more than welcome to modify the current code for the graphs.
I will communicate your idea to the rest of the team.
Good luck!
2024-06-06 09:55 AM
Hello
First of all, if you dont need X values, it is maybe better to use DynamicGraph. With that you can add point like
dynamicGraph1.addDataPoint(value); and points are evenly placed to the graph.
if you check source of graphs (at \Middlewares\ST\touchgfx\framework\include\touchgfx\widgets\graph & \Middlewares\ST\touchgfx\framework\source\touchgfx\widgets\graph) you can probably implement customized function to clear graph and add all points from array with single function call but i'm not sure is it much faster method. If you test this option, remember to put modified .cpp files for example to \TouchGFX\gui\src\common- folder to get those compiled.
Hope this helps.
Br JTP
2024-06-10 08:08 AM
Hello JTP,
Thanks for the suggestion, I will try customizing the graph function. My application has a large array of static data ( up to 65000 points ). I would like to display a portion of this data on a static or dynamic graph and quickly scroll through the data by updating all the graph points with the next set of data. Using addDataPoint() causes the graph to update with the one new point, but is slow compared to updating all points before refreshing the graph. Having a faster method would allow for fast panning and scrolling through the data. It would be a nice feature to add to static graphs in TouchGFX.
Dan
2024-06-28 06:05 AM
Hello @DWWelch ,
Unfortunately, there are no current solutions for your described behavior. However, as @JTP1 has pointed it out, you are more than welcome to modify the current code for the graphs.
I will communicate your idea to the rest of the team.
Good luck!