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)

3 REPLIES 3
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