Skip to main content
Associate II
April 15, 2025
Question

having dynamic Y-axis in Dynamic Graph

  • April 15, 2025
  • 1 reply
  • 308 views

 

Hey buddies,

How can I have a dynamic graph in TouchGFX that Y-axis can change dynamically like X-axis? Because when the dynamic graph receives values bigger or less than the defined "Value Range" in the properties can't show anything.

Actually, I want the graph always in the middle of the Y-axis not wandering up and down.

The "Chart" in STM32cubeMonitor has exactly the ability that I want. 

 

1 reply

GaetanGodart
Technical Moderator
April 16, 2025

Hello @STjohn ,

 

You can look at the dynamic graph example :

GaetanGodart_0-1744812226228.png

When the slider changes, we call setGraphRangeY() to change the y scale.

For your case, you should check the new value added and see if it is within your Y range or not before calling setGraphRangeY().

 

Regards,