defined millibars value=1037 and grafana feels free to turn this in to 1.037 bar in the chart.
Any idea? A way to clever coder? The space agained from using the next possible larger SI unit can’t be the reason at all since printing 1.037 bar against 1037 mbar is same length. Once a dot the other times the additiobal m makes no difference at all.
grafana should respect what the user defines since it not the option for selecting the units could get removed.
That’s just the way units in Grafana work. If you don’t want to use them, then set the unit to none and use the label field instead.
… which is a poor solution as your image does show, but you might have noticed this yourself I bet, since the axis then has nondefined values on it’s own. And simply adding a value text isn’t that appealing.
Sorry, don’t have any other suggestions. I personally think this is a good feature and the way it should work.
Using ‘none’ being the unit would have been an option if only one would have been entitled to define a suffix for the values similar to what gauge offers.
You can open an issue on GitHub suggesting your solution but the Graph panel already has a million options so think it is unlikely we will add more. If you can think out a way to add this cleanly and in a way that would be useful to lots of people then it has a better chance of getting implemented.
You can set decimal places so that the unit is shorter.
Or if you are a developer and would like to contribute to Grafana, you could try and improve the algorithm for calculating the y-axis. The unit is defined here and the scaledUnits function here. But be warned, this is tricky to change as there are so many edge cases (as you have discovered).
The “Value” section in my Grafana has “Stat”, “Prefix” and “Postfix” in the first
3 rows, with a “Font size” box next to them. Underneath that is the “Unit”
selector, with a gap to its right.
I suggest putting a checkbox in that gap, labelled something like “Fixed”,
meaning that the units you’ve selected will always be used without scaling,
and if it’s not selected (the default), Grafana will scale the unit to display
“nice” numbers.
Regards,
Antony.