Skip to main content
Visitor II
April 7, 2020
Solved

Dinamically change chart Y axis min and max

  • April 7, 2020
  • 10 replies
  • 3716 views

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

    This topic has been closed for replies.
    Best answer by Thierry

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

    10 replies

    Visitor II
    April 7, 2020

    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 ?

    MyzharAuthor
    Visitor II
    April 7, 2020

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

    Visitor II
    April 7, 2020

    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".

    MyzharAuthor
    Visitor II
    April 7, 2020

    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

    Visitor II
    April 7, 2020

    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

    MyzharAuthor
    Visitor II
    April 7, 2020

    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".

    ThierryAnswer
    Visitor II
    April 7, 2020

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

    Graduate II
    January 9, 2025

    @Thierry 
    Any news on the state of implementation of this?
    I noticed that the chart's help shows that there's a property "Y-Axis" where one can manually set the limits but I cannot see this property in the actual chart settings.

    Technical Moderator
    January 30, 2025

    Hello @DMeie.2 .
    "Y-Axis" property is only available for Bar Chart type.

    MyzharAuthor
    Visitor II
    April 7, 2020

    Thank you @Thierry​ 

    I really appreciate your support.

    Visitor II
    March 2, 2022

    Has this feature been implemented in the ST chart?

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

    Graduate
    September 30, 2022

    I'm also supporting this idea! Manually setting the limits of the chart would be very helpful in quite a few cases. Are there any current plans to include this functionality?

    Don't get me wrong: Autoscaling is helpful very often. But sometimes it is not...