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

Panel stacking should automatically consider NULL as 0 for the graphic representation #15690

Open
sylr opened this issue Feb 27, 2019 · 10 comments

Comments

@sylr
Copy link

sylr commented Feb 27, 2019

I know there as been a number of issues about this but using null as 0 is not a good solution because it messes up with the aggregation values (min, max, average, current) in the legend.

If you are stacking you are obliged to use null as 0 otherwise you might have surprises in your graphs but if you do so you can't trust the aggregation values in the legend because a Null in the timerange will:

  • Set min to 0 even if your metric never had this value
  • Set current to 0 even if the metric (/labels combinations) does not exist anymore
  • And it will make the average totally bogus

So my proposal is to automatically consider Null values as being 0 (but would be super nice if nothing was drawn) for the graphic representation when stacking so that you can choose whether or not you want to consider Null as 0 for the aggregation functions.

Cheers.

@sylr sylr changed the title Graph stacking should automatically consider NULL as 0 Panel stacking should automatically consider NULL as 0 for the graphic representation Feb 27, 2019
@xlson
Copy link
Contributor

xlson commented Feb 27, 2019

Leaving this one to you @torkelo @Ijin08

@roidelapluie
Copy link
Collaborator

I agree with OP.

@sylr
Copy link
Author

sylr commented May 27, 2019

@torkelo @Ijin08 care to comment on this ?

@sylr
Copy link
Author

sylr commented Sep 13, 2019

@torkelo @Ijin08 ?

@onumossn
Copy link

Any plans for this?

@grandich
Copy link

grandich commented Mar 26, 2021

+1

I'm new to Grafana and painfully stumbled upon this. One example of 'surprises' in graphs: when turning on and off Prometheus node exporter' collectors:

Node Exporter Scrape Time

With Null Value=null (incorrect)
image

With Null Value=null as zero
image

Albeit no difference in legends...

@djahandarie
Copy link

djahandarie commented Jun 23, 2022

I think this is a UI/readability issue pretty much anyone who uses stacked graphs in Grafana will run into. Is there any chance this can get prioritized?

Also, it's likely this should be recategorized as a bug instead of a feature request.

@jhoos70
Copy link

jhoos70 commented Sep 25, 2022

Me too, missing the possibility to keep zero values down at the axis.

@tvsaru
Copy link

tvsaru commented Oct 13, 2022

I am yet another person who tripped on this weird behavior (in Grafana v8.4.6)

In my example screenshot below, of stacking graphs, the yellow line is supposed to be 0, while green line was 1, but the yellow line masks the green line giving a wrong visualization of the data (makes it look like yellow was 1 for the whole time period).

image

@AndrewJDR
Copy link

Looking forward to a solution for this as well

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

No branches or pull requests

10 participants