2025-01-03 10:22 AM
I have a dynamic graph set to scrolling. When I call graph.clear(); it will set the initial graph back to my range 0-100, but once it starts scrolling it instantly jumps to the last highest value being the start of the new range instead of continuing scrolling.
EX: Graphing is as expected to x = 200. Clear. Normal graphing 0-100. Once scroll starts, jumps to range 200-300 and starts graphing at x = 300
0-200 : clear : 0-100 : 200-300 (graph and scrolling starting at 300)
2025-01-13 07:05 AM
Hello @EthanMankins ,
I am having trouble understand the problem exactly.
Could you share your project and share some screen shots of the issue?
Regards,
2025-01-13 03:25 PM
Hi @GaetanGodart ,
I am unable to share the project due to business constraints.
I Currently have worked around the issue by using goToScreen, but just going to the current screen to reload the entire Screen and values.
I have attached some pictures I just made that replicate the issue.
Normal Scrolling action
graph.clear()
Normal plotting action until x = 100 (whenever scrolling action resumes)
Once scrolling action starts, x-axis jumps to the last greatest x-value(200) as lowest x range value with the whole range full
2025-01-14 09:39 AM - edited 2025-01-14 09:46 AM
Hello
It seems to be bug on the GraphScroll.cpp, this dataCounter- variable is not cleared.
void GraphScrollData::clear()
{
DynamicDataGraph::clear();
current = 0;
dataCounter=0; // ADD THIS LINE
}
This source file is located \Middlewares\ST\touchgfx\framework\source\touchgfx\widgets\graph\ folder.
However, it is not compiled there, so copy it to \TouchGFX\gui\src\common\ -folder, for example.Then add this one line to clear- function.
Hope this helps
Br JTP