cancel
Showing results for 
Search instead for 
Did you mean: 

having dynamic Y-axis in Dynamic Graph

STjohn
Associate II

 

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 1
GaetanGodart
ST Employee

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,

Gaetan Godart
Software engineer at ST (TouchGFX)