cancel
Showing results for 
Search instead for 
Did you mean: 

Dinamically change chart Y axis min and max

Myzhar
Associate III

Hi,

I would like to set the minimum and maximum values of a dashboard chart using custom values calculated with a processing node.

I tried "single value" and "change" nodes, but without success.

I attached my current flow...

Thank you

Walter

1 ACCEPTED SOLUTION

Accepted Solutions
Thierry
Senior

OK I understand. Definitively this is something we will consider for a futur release of STM32CubeMonitor.

View solution in original post

10 REPLIES 10
Thierry
Senior

Hi Walter,

If I understand correctly you would like to change dynamically (during an ongoing acquisition) the y axis range of the "ST chart". Is that correct ?

Myzhar
Associate III

Yes exactly. The automatic range is too wide and I cannot appreciate the changes in the plot.

Thierry
Senior

Unfortunately setting the y range by msg.payload is currently not supported in "ST Chart" node.

The "ST chart" auto range is based on min max values currently displayed in the windows of interest (by default the last 10s of acquisition). By this way, the range is continuously updated to fit as best as possible the data sent to the "ST chart".

There is another chart available in the palette under "dashboard" category. This chart supports the y range setting by msg, but in order to use it behind our "processing" node, you need to adapt the injected data structure which is different from the one expected by "ST chart".

Myzhar
Associate III

Automatic Y axis range is a good feature, but ymin and ymax are too high to appreciate variable changes when the mean value is high.

In my case I plot an atmospheric pressure that has a mean of about 1025 hPa and a variance around 0.02 hPa, you can understand that the current automatic range setting are not well suited in my case.

To really appreciate the dynamic of my variables, in the case of the attached picture, I'd need for example ymin = 1027 and ymax=1027.5:

0693W000000VT3LQAW.png

Thierry
Senior

Yes I understand but as we speak about atmospheric pressure & temperature, the variation should be relatively slow, and I guess it is not needed to perform value acquisition at high frequency (maybe once every second should be enough by far). If I'm right, the chart from dashboard category might be a good solution to look at. This chart is not provided by ST (then you need to adapt data structure by using split & change nodes), but it supports the range change by msg.

Nevertheless generally speaking I do not recommend using non "ST chart" as with other charts:

1- you will quickly face performance issues because other charts are not designed to get thousands of points per seconds. The performance limitation can be acceptable if the acquisition frequency is limited to max few points per seconds.

2- you will loose out of the box functionalities like zoom, brush, import

Myzhar
Associate III

They are not, mainly for atmospheric pressure where 0.01 hPa correspond to ~8 cm of altitude variation.

I'm designing a Kalman filter to estimate altitude using barometer and IMU, that's why I need to understand very well the dynamic of my variables and I hoped that the new ST monitor tool could help me in this phase of studying.

I agree that the ST chart is very well suited for this kind of study, but it should be a bit more "elastic".

Thierry
Senior

OK I understand. Definitively this is something we will consider for a futur release of STM32CubeMonitor.

Myzhar
Associate III

Thank you @Thierry​ 

I really appreciate your support.

PeterJ
Associate II

Has this feature been implemented in the ST chart?

If it has been implemented, please share how to set Y and X axis.