-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
graph: show "significant figures" instead of decimal places #8621
Comments
This or a similar feature is especially helpful for displaying counters, e.g. energy counters. One thing that could perhaps be done easily, is prohibiting the automatic conversion of units to K, M, G... some way. To begin, one could stop the conversion as soon as zero decimal places have been specified. For example: This way we could alleviate the problem without introducing a completely new feature. Zabbix (which I use as a backend to grafana) has the following solution to this problem: It allows to specify the unit with a modifier. Example: If I define the unit as dWh (deciwatthours), it will convert to Wh, kWh, MWh etc. as usual. However, if I prepend the unit with an exclamation mark ( !dWh ) it will always be shown as dWh. For energy counters, this is very helpful: I have energy counters with a 1 dWh resolution and want to display the exact value. In a diagram with a counter starting at about 1.75 MWh on the y-axis it looks like this: Sorry, some numbers are cut off from the graphic, but the idea can be seen. Zabbix is less than perfect in rendering graphic, this is why I prefer Grafana... #38493 was my original post about this. It would be nice if we could do something like this in grafana, too. So I add my suggestion here. |
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions! |
This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions! |
What Grafana version are you using?
4.3.2
What datasource are you using?
Prometheus
What OS are you running grafana on?
Linux
What did you do?
Created a single-stat with € unit, specified "2 decimals" precision
What was the expected result?
€1.2K
or€1200
,€460
What happened instead?
€1.23K
,€456.78
The shortening of the value (1K instead of 1000) makes this even more confusing, but as a feature I would also like this for un-shortened numbers. Sometimes a number is known not to be exact and I'd rather only display a certain number of significant figures. Currently, I can only specify "decimals" (right of the point) while significant figures might already end left of the point.
For shortened units this is even worse because the precision implied varies wildly (plus/minus 3 figures).
This could either replace the Decimals or be an additional option.
The text was updated successfully, but these errors were encountered: