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)
Solved! Go to Solution.
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
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
Normal Scrolling action
graph.clear()
graph.clear() Normal plotting untill x =100
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
2025-01-23 05:52 AM
Hello @EthanMankins ,
I will report the issue with the team.
Can you tell me the steps to reproduce the issue?
(You can share the project in private message if that is ok with you).
Regards,
2025-01-23 10:13 AM
@GaetanGodart , the issue was as described by @JTP1 hope this helps to further improve touchgfx
2025-02-03 03:34 AM
Hello @EthanMankins and @JTP1 ,
I will notify the team and together we will determine the appropriate approach to ensure a seamless experience for the users.
Regards,
2025-02-03 07:06 AM
Hello Gaetan
If you need, I can make example which repeats the problem.
Br JTP
2025-02-03 08:23 AM
Hej @JTP1 ,
That is kind of you but I have made one myself already, find it attached.
Regards,