cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Graph Scrolling clear failure

EthanMankins
Senior

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)

1 ACCEPTED SOLUTION

Accepted Solutions
JTP1
Lead

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

 

 

View solution in original post

8 REPLIES 8
GaetanGodart
ST Employee

Hello @EthanMankins ,

 

I am having trouble understand the problem exactly.

Could you share your project and share some screen shots of the issue?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

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 actionnormal scrolling action

Normal Scrolling action

graph.clear()

graph.clear() Normal plotting untill x =100graph.clear() Normal plotting untill x =100

Normal plotting action until x = 100 (whenever scrolling action resumes)

 

graph2.png

Once scrolling action starts, x-axis jumps to the last greatest x-value(200) as lowest x range value with the whole range full

JTP1
Lead

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

 

 

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

@GaetanGodart , the issue was as described by @JTP1  hope this helps to further improve touchgfx

GaetanGodart
ST Employee

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello Gaetan

If you need, I can make example which repeats the problem.

Br JTP

GaetanGodart
ST Employee

Hej @JTP1 ,

 

That is kind of you but I have made one myself already, find it attached.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)