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

Request for decimal precision #1253

Closed
ghost opened this issue Dec 18, 2014 · 26 comments
Closed

Request for decimal precision #1253

ghost opened this issue Dec 18, 2014 · 26 comments

Comments

@ghost
Copy link

ghost commented Dec 18, 2014

Hi,
The new way that Grafana automatically tries to put decimal points in or round small numbers if necessary is messing up a lot of my graphs. I would like the ability to choose a "X.XX" (or X number of decimal places) number format so that it doesn't keep rounding my values.

Thanks

@torkelo
Copy link
Member

torkelo commented Dec 18, 2014

Do you have any examples where the auto decimal precision is causing problems?

@ghost
Copy link
Author

ghost commented Dec 18, 2014

decimalexample

Hello,
Here, we have three very similar graphs working from percentage functions. They only switch to having decimal places when the range is very tiny, like in the top one. The values are always floats but get rounded if the range of the graph is more than about 6, I think.

Note that the mouse hover values have decimal points if the legend ones do.

@torkelo
Copy link
Member

torkelo commented Dec 18, 2014

yes, the decimal precision is based on how large the distance is between two labels on the y axis.

@ghost
Copy link
Author

ghost commented Dec 18, 2014

The cut-off point is far too low I think. Version 1.8 showed the percentages fine. An option would be good.

@bouthors
Copy link

bouthors commented Jan 1, 2015

Same issue with temperatures, I would like to see at least one decimal.
grafana
On the other hand, the pressure (Pression) in hPa should be displayed without decimal : 1033 instead of 1.03300 K.

@infinitydon
Copy link

Hi,

Am also having this issue, some graphs show decimal points while it rounds off some to integer values, the previous version works well with the decimal numbers...

Any help on this?

I downgraded to 1.8.1 and it does not have that problem.

@torkelo
Copy link
Member

torkelo commented Jan 21, 2015

The previous version did not work so well in many other cases (as it was hard coded to only 2 decimals in all scenarios). I will try to solve this when I have time. The decimal precision (especially when scaling units, ns -> ms -> s -> min, or K -> Mil -> Bil) is so complex that it is tricky to get all scenarios right.

@infinitydon
Copy link

Ok...No prob then..

I appreciate the good work. Many thanks

@henkye
Copy link

henkye commented Mar 12, 2015

+1
it's basically last issue keeping us from deploying Grafana at production.
grafana-problem

torkelo added a commit that referenced this issue Mar 12, 2015
@torkelo
Copy link
Member

torkelo commented Mar 12, 2015

@henkye well if you put it like that I guess I just have to fix it, which I just did :)

Both singlestat and graph panel now have a decimal override option, works with all unit formats.

image

Only fixed in develop branch (Grafana 2.0)

@torkelo torkelo closed this as completed Mar 12, 2015
@torkelo torkelo added this to the 2.0 milestone Mar 12, 2015
@ghost
Copy link
Author

ghost commented Mar 13, 2015

That's awesome, thank you.

On 12 March 2015 at 18:39, Torkel Ödegaard notifications@github.com wrote:

Closed #1253 #1253.


Reply to this email directly or view it on GitHub
#1253 (comment).

@henkye
Copy link

henkye commented Mar 13, 2015

@torkelo great, looks like I'm VIP :-)
Thank you and happy graphing! We at stable.cz appreciate your work.

@ireun
Copy link

ireun commented Jul 2, 2016

Where is this option now? I cannot find the graph precision setting..

@rebeccathedev
Copy link

Seconding @ireun's question. I'm using 3.3.1 and I don't see this option anywhere on graph settings.

@phemmer
Copy link
Contributor

phemmer commented Aug 6, 2016

Thirding the question. I'm on 3.1.1 (a lowly peasant and don't have time travel capabilities to get 3.3.1 :-P)

Edit: Found it (stumbled across it adjusting other settings)
image

@ireun
Copy link

ireun commented Aug 6, 2016

Quadding the question. I also found it a while ago, anyway, thank You. ;)

@rebeccathedev
Copy link

2016-08-06_0750

Sorry, fat fingered the version number. It's 3.1.1.

For me that works on the legend but not on the axis, though. At least not when I zoom

@ireun
Copy link

ireun commented Aug 6, 2016

@peckrob How do you check which version of grafana are you using? Honestly, I have no idea which one am I using.

And yes, it only sets the precision of the legend, not te axis. Though it shows the graph with as high precision as possible, if that's necessary. I'm using grafana to show data from my weather sensors, and I'm using moving_avarage() function of InfluxDB, to smooth the graph and add values between the readings..

image

Edit:

Unpacking grafana (3.1.1-1470047149) over (3.1.0-1468321182) ...

Got it. ;)

@Corbyn
Copy link

Corbyn commented Sep 6, 2016

It would be very helpful to have the decimal precision override option also for the y axis! If the value stays constant over a long time (like it is often with disk usage) Grafana always puts in as many decimals as possible and that messes up the graphs...

2016-09-06 17_12_23-grafana - os_linux_disk

@sunface
Copy link

sunface commented Sep 19, 2016

met the same bug with Corbyn, y axis precision need to be overrided too!

@rende2005
Copy link

Same issue here for the unexpected y-axis lable display. Eager to see the fix/enhancement. Thanks!

@torkelo
Copy link
Member

torkelo commented Dec 7, 2016

should be fixed/improved in v4.0

@tomekit
Copy link

tomekit commented Dec 14, 2016

Facing similar issue, +1 bump :)

@mrqwer88
Copy link

Hello!
Unfortunately looks like not fixed for y-axis label display in v4.1.1

grafana-server -v
Version 4.1.1 (commit: v4.1.1)

from 4.1.1-1484211277 deb package.

Avg, max in legend looks ok after set "Decimals".
But y-axis with "Decimals" 2 in legend looks -
looks_not_fixed_in_v4 0

@iankittomar
Copy link

Hello All,
@torkelo

I am using Prometheus 2.3.2 and Grafana 5.2.2 Versions, I have created ActiveMQ Message Alert Rules, I am getting Alerts I decimals(value=1.048) when I crossed checked with Grafana panel(value=2) and in Prometheus, it's in Integer(Value=2). It's a message so it won't be in Decimal.
Can anyone tell me please how to figure it out this problem?

Its Imp to solve :(

thanks

@Murthidn
Copy link

Murthidn commented Jul 26, 2019

Folks under Axes section (in Unit) you can select the value whichever you want, even i had same issue, after checking this helped me:

image

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