Correct implementation of FormatValueLabel?
Posted: Tue Mar 14, 2017 2:40 pm
Hi!
I need to implement a FormatValueLabel handler, since we need values displayed with SI suffixes for kilo, milli, giga etc - e.g. "23.451m" instead of "0,023451" or "2,3451E-2".
However, I cannot figure out how many decimals to show? I tried to use FormatValueLabelEventArgs.Axis.MajorDiv,
but that seems to just return (max-min)/Axis.MajorDivCount? And this make me generate numbers with way too few digits, especially when zooming?
How can I find out what the numerical distance between labels are, so I can generate a sufficient number of digits?
The built in formatting seems to do it nicely, but doesn't fit our requirements?
Or is there another way to do this?
I need to implement a FormatValueLabel handler, since we need values displayed with SI suffixes for kilo, milli, giga etc - e.g. "23.451m" instead of "0,023451" or "2,3451E-2".
However, I cannot figure out how many decimals to show? I tried to use FormatValueLabelEventArgs.Axis.MajorDiv,
but that seems to just return (max-min)/Axis.MajorDivCount? And this make me generate numbers with way too few digits, especially when zooming?
How can I find out what the numerical distance between labels are, so I can generate a sufficient number of digits?
The built in formatting seems to do it nicely, but doesn't fit our requirements?
Or is there another way to do this?