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

Limit Decimal Places / Precision in Y-Axis #2759

Closed
ghost opened this issue Sep 17, 2015 · 16 comments
Closed

Limit Decimal Places / Precision in Y-Axis #2759

ghost opened this issue Sep 17, 2015 · 16 comments

Comments

@ghost
Copy link

ghost commented Sep 17, 2015

It'd be great if there were a way to limit the precision of the Y-Axis. For some reason I randomly get behavior like the attached image with 15 digits after the decimal point.

image

I looked around at the other issues and the closest I can find is talking about doing this for the legend, which this isn't.

I'm running Grafana 2.1.3 (via RPM), the counter is from Graphite.

@torkelo
Copy link
Member

torkelo commented Sep 17, 2015

Since you have only a single series with no change, the auto detection of series min/max becomes very narrow compared to the scale of the series which causes the auto decimal precision to be out of wack. You can fix it by specifying a Grid Min value

@ghost
Copy link
Author

ghost commented Sep 18, 2015

Thanks, and yes - that would be a work around.

Controlling the decimal places shown would be handy for other scenarios too - eg for tracking integer values (write failures, visitor counts, etc) - where there's no point in having an axis that shows fractions.

@agaon
Copy link

agaon commented Nov 19, 2015

Just encountered the same situation in Grafana 2.5, and although @torkelo workaround works, it would be nice if the Decimal selection for the legend would also work on the Y-axis.

@yehosef
Copy link

yehosef commented Feb 29, 2016

+1 - not sure how to set the minimum grid level - I see setting the min/max Y, but I don't want to do that as the value might change (eg today it's hovering steady at 1MB and tomorrow it'll be steady at 10MB)

@farzadpanahi
Copy link

Is it possible to have Y-axis with no decimals? I have a graph that is counting the number of connection attempts. So my values are like 0, 1, 2, 3, ... Decimal is irrelevant in this case. How can I make Y-axis show only integer numbers?

@hwinkel
Copy link

hwinkel commented Apr 2, 2016

is there any solution for that. we also have a y-axis just counting things.

@torkelo
Copy link
Member

torkelo commented Apr 2, 2016

One workaround can bring to set your a axis min and max

@drewhemm
Copy link

Also just want a count of objects in the y-axis, decimals have no meaning when you are counting whole items, such as server instances:

screenshot from 2016-07-20 11-15-18

Setting mix and max values doesn't help. The only thing which forces the alignment of values with whole numbers in the y-axis is setting the 'Scale' to 'log (base 2)':

screenshot from 2016-07-20 11-18-14

I don't believe that is the correct solution...

@torkelo
Copy link
Member

torkelo commented Sep 15, 2016

solved by #6051

@torkelo torkelo closed this as completed Sep 15, 2016
@torkelo torkelo added this to the 4.0.0-Beta1 milestone Sep 15, 2016
@kbrownlees
Copy link

For anyone stumbling on this issue, the fix in #6051 appears to have been reverted (not available in 4.4.1 at least), #8187 is the new issue which currently has milestones of 4.5 & 5.0.

@torkelo
Copy link
Member

torkelo commented Aug 30, 2017

#6051 has nothing to do with decimal option

@kbrownlees
Copy link

You closed this issue with #2759 (comment) saying:

solved by #6051

While it was not the 'solution', it appears to have been the work around while there was no solution? #8187 appears to be the actual solution, but it has not been released yet.

@scalp42
Copy link

scalp42 commented Jun 8, 2019

@drewhemm did you ever figure it out?

@crawforde
Copy link

Having problems with this. Some plots have integers on the y axis. Some use decimals. All the settings appear to be the same.

@shravan-Quovantis
Copy link

Since you have only a single series with no change, the auto detection of series min/max becomes very narrow compared to the scale of the series which causes the auto decimal precision to be out of wack. You can fix it by specifying a Grid Min value

please explain it in detail

@shravan-Quovantis
Copy link

Is it possible to have Y-axis with no decimals? I have a graph that is counting the number of connection attempts. So my values are like 0, 1, 2, 3, ... Decimal is irrelevant in this case. How can I make Y-axis show only integer numbers?

Just put 0 in the field of decimal for y axis and apply

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