Skip to main content
GS1
Senior III
July 17, 2022
Question

TouchGFX 4.20.0. Vertical Frontline Problem in Dynamic Graph Widget

  • July 17, 2022
  • 12 replies
  • 6747 views

Hello all,

I am using the Dynamic Graph to display incoming data over time. The frontline moves forward on the x-axis as expected.

Then the user presses the Start Button to record the data, I clear the graph and restart at 0. The vertical frontline also restarts from position x.

BUT: the previous frontline position is not removed in the graphics and stays there as a vertical non-moving line until the current frontline overwrites it.

How can I remove this "old" vertical frontline?

I have tried the following:

graphicVerticalFrontline.setVisible(false);

graphicVerticalFrontline.invalidate();

graphic.clear();

graphic.invalidate();

graphicVerticalFrontline.setVisible(true);

graphicVerticalFrontline.invalidate();

0693W00000QLNnlQAH.png 

Has anybody an idea how to remove the old frontline?

BR GS

This topic has been closed for replies.

12 replies

Yoann KLEIN
ST Employee
July 18, 2022

Hello @GS@S​ ,

Could you please share your project ?

It would make it more easier for us to help you with your issue.

Thank you,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
GS1
GS1Author
Senior III
July 18, 2022

Good morning, Yoann,

sorry, I can not share the project as it is confidential and only running on our target system.

But I think you can easily reproduce the issue by creating a graphics and do a graphics reset after some time. I assume you have demo system where you tested your dynamic graph widget. So please just try by yourself.

BR GS

Yoann KLEIN
ST Employee
July 18, 2022

Hello,

I tried to reproduce your issue, but it works fine for me.

I began with the Dynamic Graph Example available in TouchGFXDesigner.

Then, I added

graph.clear();
graph.invalidate();

in the handleTickEvent() method, in order to clear the graph content on a regular basis.

I also checked "Wrap and Overwrite" and "Vertical Frontline" options available in the Dynamic Graph Widget configuration.

In my project the Graph data and the Frontline are cleared correctly every 180 ticks.

You can find my project attached to this post.

Hope that this helps you,

/Yoann

Yoann KLEINST Software Developer | TouchGFX