New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphNG: Adds support for soft min and soft max for better auto-scaling axis limits #30326
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Lots will be happy with this new capability!
Yea, both looks like we can close with this change😃😃 |
@leeoniya @torkelo if this closes #4156, does that mean that we can now have say four graphs side by side which all have their min-max synchronised? For example, imagine four temperature sensor graphs with an auto y-axis scale of 30 ºC to 40º C and values around 35 ºC. If one of the sensor values were to spike to 50 ºC and the y-axis range of it's respective graph to increase from 30 ºC to 50 ºC to cover the spike, would the other three graphs also be able to have their y-axes synchronised? If not, then I don't believe this closes #4156. |
yeah, it's not a 100% fix but significantly improves the situation. i'm still pretty new to Grafana, so not sure how realistic a cross-panel y axis sync is. coincidentally, there's a recent similar request in uPlot for this that i'm gonna work through: leeoniya/uPlot#433. disabling uPlot's built-in "zoom on selection end" looks like prerequisite, which Grafana already does. but this is more complicated because it needs to cross-sync specific units across specific panels, not just on zoom but also on data updates. and there needs to be some UI for defining which panels & units to sync. part of this may hinge on synchronizing the data pipeline across all panels in a dashboard, which is being prototyped on-and-off. @torkelo can re-open if he thinks this is a realistic thing for the future. |
Thanks both. The synchronisation of graphs would be super useful, especially when you're monitoring grouped yet separate graphs and want to be able keep things visually consistent, so I think #4156 still remains an "in demand" request. That being said, this ticket is a great feature, just not the same one 😄 . |
According to the diff, this is not available to the graph panel, right? |
the graph panel is on its way out and won't be getting much love going forward. its replacement is called "Time series", which is where this will be available. |
Where can I find the exact formula on how these values are used? It is not the docs, they are ambiguous. My understanding is the following:
But I'm not sure what happens if |
Hi, I'm running 8.4.4 Is that a high enough version? I cannot see anything related to hard and soft in the axes definitions. My interest is in always displaying the threshold line. (FYI I am displaying barometric pressure and want the "normal" threshold to be visible. I got sent over here because the original question asking for threshold visibility was closed pointing here. Any help / advice gratefully received! |
Hi, thanks for replying. I had my pressure graph on "Graph", not "Time series" which looks like it got upgraded to remain the default. So that solves one problem. The other is that I don't quite understand what "soft" means. Do I put the min and max at the extremes and let the system work it out? Does it automatically take note of the threshold? Thanks! Edit: as far as I can see, it behaves just like the previous min, max. |
if you only set min and max, then yes. they are treated as hard limits. we did not want to break that. for your case, you can omit |
I see! Many many thanks! That's great! B. |
softMin & softMax can prevent blips from turning into mountains when the data is mostly flat, and hardMin/hardMax can prevent intermittent spikes from flattening useful detail by clipping the spikes past a defined point. this PR includes the work started by @ryantxu in #30238 and should close at least #979 and #5984. (maybe more).
also, soft limits can be used to "always show 0" or "only autoscale positive values". (in most cases)
Closes #979
Closes #5984.
this includes a bump for uPlot to 1.6.1 that fixes a bug in the default y auto-ranging behavior. i checked all the test panels that have stable y ranges (the y axis ticks panel) and there is only a small difference that improves last panel by bringing the 0 into range.
it should be noted that there is no support for log scales here since the ranging functions are completely different. i'm inclined to wait until someone complains before putting any work into it because very often enabling log scales serves the same purpose as setting soft limits on linear scales (to squash spikes).
below...
top panels are the default ranging behavior. the wide version is the full dataset, and each smaller panel is different interesting subset of the same data. the bottom copies of the same panels all have the following limits:
Hard: 1.5 - 6.0, Soft: 2.5 - 5.0
: