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

Feature Request: Option to hide zero values in legend and tooltip #1381

Closed
jmcle opened this issue Jan 23, 2015 · 64 comments
Closed

Feature Request: Option to hide zero values in legend and tooltip #1381

jmcle opened this issue Jan 23, 2015 · 64 comments
Milestone

Comments

@jmcle
Copy link

jmcle commented Jan 23, 2015

The new options to hide null values in the legend and 'all series' tooltip are excellent but I run into a problem when using them with stacked bar graphs.

With stacked graphs we need to set 'null as zero' in order to get the stacking to work properly but this negatively impacts the ability to hide null values in the legend and tooltip as null values will show up as zero instead of null.

I'm not sure if there's a better way to address this but one option would be to add an option to 'hide zero values' in addition to the existing 'hide null values'. Another option would be to make the 'hide value' option a parameter which you could set to any numeric value. This would be similar to what the 'removeBelowValue' function does but in this case it would affect the display of legends and tooltips.

@fzaire
Copy link

fzaire commented Sep 30, 2015

I have the same issue and I end up with 80% of the metrics in my legend with 0 value that i need to hide.
If more people are facing the same issue, we could try to commit this feature.

@torkelo
Copy link
Member

torkelo commented Sep 30, 2015

cant you filter out the zero metrics/series in your query?

@linar-jether
Copy link

+1 for this issue, as we can't filter out zeroes without breaking stacks, i.e
image

@agourlay
Copy link

agourlay commented Nov 3, 2015

+1 for this issue.

@apakulov
Copy link

+1

2 similar comments
@utkarshcmu
Copy link
Collaborator

+1

@digrich
Copy link

digrich commented Nov 23, 2015

+1

@george-vieira
Copy link

I have the same issue, my metrics shows traffic by IP and they spike in and out so at any point in time there could be values or 0. The tooltip shows 100 IPs which is overall but I only care of the point in time I'm hovering over.

@utkarshcmu
Copy link
Collaborator

The above PR only hides the zero values if all datapoints are 0. Even if a single datapoint is non-zero on the graph for a given time range, it will not hide the metric.

@Pryz
Copy link

Pryz commented Nov 25, 2015

+1

It could be nice to specify a pattern. Like "hide if < 0" or "hide if = 0" etc

@utkarshcmu
Copy link
Collaborator

As an example, Opentsdb cannot remove zeros in query itself, so it would be great if Grafana can eliminate them from Legend and Tooltip. And looks like a lot of people wants this feature to be there in Grafana.

@torkelo Are these +1s enough for #3336 to get merged? Please let me know if any refinement is needed in the PR #3336.

@dacr
Copy link

dacr commented Dec 1, 2015

+1

with a pattern such as "hide when no value" (in current time range)

@torkelo
Copy link
Member

torkelo commented Dec 1, 2015

image

@torkelo torkelo closed this as completed Dec 1, 2015
@torkelo torkelo added this to the 2.6 milestone Dec 1, 2015
@linar-jether
Copy link

will this hide a series only when all of the values are null/zero? what about the tooltip when only part of a series is null/zero and we don't want to show empty values? (see image above)

@torkelo
Copy link
Member

torkelo commented Dec 1, 2015

These options apply to the tooltip as well. They are only applied then all the values in the series are null or zero

@george-vieira
Copy link

if the whole series were to be null or 0 then that can be added as part of the query. My problem is where the series have values > 0 but most times at any part of the graph, my tooltip shows every IP address regardless of value or 0. Image describes it best.
So I don't mind the legend but tooltip showing only at the point in time, values that are not null or over 0 in value. Actually, sorting by value would be awesome too 💃

tooltip

@roysbike
Copy link

roysbike commented Dec 7, 2015

george-vieira +1 . Please add function. If value =0 hide legend

@rgombash
Copy link

+1

@torkelo
Copy link
Member

torkelo commented Dec 14, 2015

@rgombash ýou do not need to +1 as this is already implemented and in latest 2.6 release

@slava-vishnyakov
Copy link

@torkelo I'm running 2.6.0, but I'm still seeing 0 in tooltips even with 2 options "on".

Frankly it would be really useful to see only non-zero values. We have graphs with hundreds of series, but only 1 or 2 are actually non-zero at each time.

image

Often things are much worse:

image

Thanks for Grafana! Otherwise it's awesome.

@torkelo
Copy link
Member

torkelo commented Feb 24, 2016

@slava-vishnyakov the feature only hides series where are all values are zero.

if you have a lot of series where only some have values, can you not filter the metrics in your query?

@slava-vishnyakov
Copy link

@torkelo No, sadly not. Imagine hundreds of microservices that occasionally get 500 Internal error. They might get it only once every 10 minutes. So, now I'm looking at a graph that has a few huge spikes and lot of "dots". Those "dots" make those series "non-zero". I can't also predict which services are going to be failing and filter them in query.

But anyway, seeing those 0s at tooltip is IMO unhelpful. Basically, it says something like, "ok here's what you don't see at this point". For me it seems that charts might benefit from not showing zero values at tooltips even by default.

@george-vieira
Copy link

@slava-vishnyakov: that's the same issue I have as my previous pic shows. My case is a large list of IPs showing traffic data. 1 host in the series speaks for 1 second and it's on the whole time line and tooltip. So when a bunch of are all chatty at differnt times and 0 on others and then there's a spike I want to look at, all of the IPs are shown on the tooltip even though on the exact time of mouse over inspect, I get a huge tooltip.
I can't filter the series because there aren't always 0 through the whole time range query but occassionally appear in the series here and there but for that range, possibly 100 are listed all at different spots of the time line.

@scraly
Copy link

scraly commented Apr 14, 2016

Same issue here.
We need to display in tooltip only non-null non-0 values.
Thanks.

grafana_0

grafana_legend

@seabadger
Copy link

+1.
I have a large number of data series representing error occurrences for different services. A few series (representing services with on-going issues) are non zero across the time range. The rest are either zero at all times, or have an occasional blip or two.
The tooltip shows all values that had even a single blip in the time range, regardless of whether the mouse is hovering over the blip or not.

What'd be really useful for me is if the tooltip were a bit more dynamic, and could be configured to show only non-zero values at a given point (thus, the set of rows in the tooltip would be changing as the mouse moves around the graph).

In other words:
the tooltip represents just the part of the graph under the mouse cursor, and should be able to reflect only what's shown there (configurably, obviously, since not everyone needs/wants this).

This is in contrast with the legend, which represents the entire graph, so showing all series with non-zero values in the time range makes a lot more sense there.

@seabadger
Copy link

seabadger commented Jun 27, 2016

just reazlied that (1) this issue is closed, and (2) my issue is also covered by #4623. Sorry for the noise.

@halsafar
Copy link

Can't believe I just read through 2 years of comments on this and it is still not implemented.
+1...

@HardPeach
Copy link

+1 This feature is still not available out of the blue.

@1337blue
Copy link

+1 BTW chronograf does this oob

@ptchau2003
Copy link

+1

2 similar comments
@gilsand
Copy link

gilsand commented Oct 7, 2019

+1

@herlon214
Copy link

+1

@jeremie-H
Copy link

jeremie-H commented Oct 16, 2019

+1
We should at least reopen this feature request. It's not implemented. more than 4 years ago :'(
poke @torkelo

In addition, a big tooltip is hidden at the top, even if the scroll is at the top of the page. So i can't view legend on the top with values. :-(
graph_grafana

@torkelo
Copy link
Member

torkelo commented Oct 16, 2019

Not sure what you mean this feature has existed for some time and works fine.

if you toggle this option in the legend options it will hide series with only zeros in legend and tooltip
Screen Shot 2019-10-16 at 13 34 07

@jeremie-H
Copy link

Hi @torkelo and thanks for your answer !

The option "Hide series" works but it's not the wanted feature here.
The option "Hide series" will deactivate all series with only zeros for example, and it's great to keep it.

But if a serie has only one peak of data, and the rest is zero in the time range, the serie will appear and the feature request here is on hover tooltip to deactivate all data with 0 values.

Below you can see that, in the time range, we've got a first peak at 09:07 with number of series.
And at 09:14 you can see other series, if i let my mouse with the hoover tooltip, i've got numbers of series with series (even with Hide series with only zeros activate)

grafana2

And then with a great number of series, hoover toolip is sorted by decreasing ... I even can't read the series with values, because tooltip is out of range in the screen (and scroll is up)
grafana3

@torkelo
Copy link
Member

torkelo commented Oct 16, 2019

That is unrelated to the feature request your commenting on

@jeremie-H
Copy link

TITLE :

Feature Request: Option to hide zero values in legend and tooltip

Am I missing something or perhaps another issue on it ?

@torkelo
Copy link
Member

torkelo commented Oct 16, 2019

This feature was closed as it only aksed for hiding series with all zeros in legend and tooltip, implemented and shipped in v2.6

@jeremie-H
Copy link

But, zeros values are still displayed in tooltip as you can see.

I'm just a humble developer, I search on internet, i felt here, i can see more than 40 comments, a lot of people need this feature and a lot of +1 for 4 years...

I search more and find this issue which is exactly the problem I encounter.. #3094

But You've marked as a duplicate here ...

Can you reconsider your position ?

@jmcle
Copy link
Author

jmcle commented Oct 20, 2019

I can confirm that my original request was never fully resolved and Jeremie and the multiple other people who have chimed in about this are correct. It would be great if the request could be acknowledged and guidance provided in terms of how to proceed here.

@torkelo
Copy link
Member

torkelo commented Oct 21, 2019

From the issue description:

I'm not sure if there's a better way to address this but one option would be to add an option to 'hide zero values' in addition to the existing 'hide null values'.

Which is exactly what the PR did that closed this issue

@torkelo
Copy link
Member

torkelo commented Oct 21, 2019

I am not at all opposed to what your asking but please comment on a new feature request or maybe this related issue #6946

@d3noob
Copy link

d3noob commented Feb 1, 2020

For those (such as I was) looking for an option to remove zero values from a series when this represents an innacurate reading (imagine an atmospheric pressure reading which will sometimes return 0 when typical values will be from 980 - 1030), the resolution that I found easiest to implement was to add a qualifier to the query that rejected zero values. E.g; weather_barometer_mb != 0.
This had the desired effect of changing ...
image
to...
image
I realise that this will not remove zero value metrics from the tooltips, but for those like myself who were following this thread looking for the solution just explained, perhaps this will assist.

@robinsonaarond
Copy link

For my part, changing the order in tool tips was good enough to get along for now. Under Visualization -> Hover Tooltip -> Sort Order I set it to Decreasing. The tooltip still looks ugly as sin but at least the values go on top and I can see the numbers.

@tomlut
Copy link

tomlut commented Aug 10, 2020

I found easiest to implement was to add a qualifier to the query that rejected zero values. E.g; weather_barometer_mb != 0

What was the actual query you used to implement this?

I'm having trouble with the syntax.

e.g. how would I reject 0 values from this:

SELECT min("value") FROM "MB" WHERE ("entity_id" = 'db_size') AND $timeFilter GROUP BY time(1d) fill(null)

@d3noob
Copy link

d3noob commented Aug 13, 2020

From @tomlut

What was the actual query you used to implement this?

Actually that is the query. The data is pre-normalised which makes the process look really simple.

e.g. how would I reject 0 values from this:

SELECT min("value") FROM "MB" WHERE ("entity_id" = 'db_size') AND $timeFilter GROUP BY time(1d) fill(null)

Apologies, I would be learning how to do it at the same time you would be. The best advice I would give is to experiment liberally with brackets and google.

@anacrolix
Copy link

I don't follow why this issue is closed. There are several related issues and PRs that show this is an ongoing issue.

@anikpati89
Copy link

This issue is not yet fixed. Please reopen the ticket

@jmfiola
Copy link

jmfiola commented Jul 20, 2022

please reopen

@jeremie-H
Copy link

if you fall here, dont loose your time, switch to influxdb/chronograf or anything else and giveup with grafana ;-)
this issue, 7 years old, is a bad joke and will never be fixed !

it's the best advice i can give here :)

@AnnaWojciechowska
Copy link

sadly customizing the dashboard to make them user-friendly is a huge time sink and usually not much doable. See the example below (loosing hope)
Screenshot from 2023-03-14 10-37-04
t

@Xasin
Copy link

Xasin commented Apr 23, 2023

Let me add in my own bit of fuff:

I seco... Err... Fifteeth-or-so the opinion that this issue is not resolved and that this issue shall be reopened.
It should be a fairly easy thing to filter out all Legend-Entries that, for the currently-being-shown-legend, have a null or 0 value.
As was stated many times, certain workloads with a large number of series that only occasionally spike and are mostly zero will lead to an unreadable legend that is hard to parse.

My use case, monitoring when certain process CPU usages spike, looks like this:
image

And I think it's quite silly to have only 5% useful information displayed in the legend.

@lucumt
Copy link

lucumt commented Apr 9, 2024

if you fall here, dont loose your time, switch to influxdb/chronograf or anything else and giveup with grafana ;-) this issue, 7 years old, is a bad joke and will never be fixed !

it's the best advice i can give here :)

Two years has gone,this issue sames still exsits!

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

No branches or pull requests