Skip to content
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

Stat visualization auto min/max yaxis with multiple metrics #32765

Closed
konvica opened this issue Apr 7, 2021 · 4 comments · Fixed by #36497
Closed

Stat visualization auto min/max yaxis with multiple metrics #32765

konvica opened this issue Apr 7, 2021 · 4 comments · Fixed by #36497

Comments

@konvica
Copy link

konvica commented Apr 7, 2021

What happened:
I updated grafana from 7.3.7 to 7.5.3 and installed few plugins and noticed my STAT visualization is no longer aligned. See image.
image

It seems the yaxis of the graph is calculated separately for each metric (device). One of the device observed an anomaly so its y-axis is very wide, while other device have very narrow y-axis.
I see 2 issues with this behavior:

  • less beautiful
  • It can cause misinterpretation if someone tries to compare the graphs this way

Easy fix is to manually set y-axis to constants, but then you lose the autoscale ability. I think that autoscaling each metric by itself is more dangerous than useful.

What you expected to happen:
I expect autoscale to calculate global min and max across all metrics (devices).

How to reproduce it (as minimally and precisely as possible):
I cannot publish dataset. Example data should be timeseries for multiple devices. Use STAT visualization using device as metric and add any anomaly to just one device.

Anything else we need to know?:
This problem can be happening to people without knowing it, since it requires an anomaly to be fully visible (e.g. on above image, we dont know if the similar graphs on sides are using 0 as ymin limit).
Might be connected to #30326

Environment:

  • Grafana version:7.5.3
  • Data source type & version: Postgresql 12
  • OS Grafana is installed on: Official Docker Image
  • User OS & Browser: Windows, Chrome
  • Grafana plugins: grafana-clock-panel 1.0.1,grafana-simple-json-datasource 1.3.5, grafana-world-panel 0.3.2
  • Others:
@kaydelaney
Copy link
Contributor

@leeoniya

@kaydelaney kaydelaney added area/frontend area/panel/graph needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating labels Apr 8, 2021
@leeoniya
Copy link
Contributor

leeoniya commented Apr 9, 2021

yes, this is a side-effect of that PR. the data min/max is now per-graph rather than per-panel since all the autoscaling behavior (including soft and hard limits) is now delegated to the graph component.

the point of softMin/softMax settings was in fact to stabilize the ranges in the presence of anomalies, but not having these settings in the stat panel while also removing the shared min/max across graphs has the opposite effect: destabilizing.

i don't think we intend to bring back the previous, shared panel-level min/max behavior, but at least we should look into exposing softMin/softMax in the stat panel as well (similar to Timeseries) to bring back some range stability control with auto-scaling and hard-limiting of anomalies.

i'll add this to the todo list.

@leeoniya leeoniya added type/feature-request area/panel/stat and removed needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating area/panel/graph labels Apr 9, 2021
@leeoniya leeoniya mentioned this issue Apr 9, 2021
40 tasks
@ecraven
Copy link

ecraven commented Jul 1, 2021

The previous behaviour was actually nice in specific use cases, so it is a pity that this has been removed :-/ I'd be happy about any improvement here.

@leeoniya
Copy link
Contributor

leeoniya commented Jul 1, 2021

i think for visualizations that use <VizRepeater>, (Stat, Gauge and BarGauge) we can bring this behavior back.

we'd need to disable independent ranging of the embedded chart component and have VizRepeater scan all the data and pass down the cumulative dataMin and dataMax that will then be used without any extra padding logic, which isn't needed anyhow when we're not showing a grid or tick values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants