Page 1 of 1

Auto tick marks at "zero" not exact

Posted: Thu Oct 24, 2013 9:13 pm
by ShawnCG
In order to support generic charting scenarios, I'm specifying LabelsNumberFormat to be "G3" for X- and Y-axes in a ViewXY plot. Mostly this works great, but there are occasions when dragging or panning the chart area around where the axis label at zero displays an annoying, very small number as the label. Is there a reasonably easy way to avoid this? See the following screenshots for examples.
Example showing desired behavior
Example showing desired behavior
Example1_allGood.png (81.14 KiB) Viewed 7103 times
Example showing bad behavior on y-axis
Example showing bad behavior on y-axis
Example2_xGood_yBad.png (104.42 KiB) Viewed 7103 times
Example showing bad behavior on x-axis
Example showing bad behavior on x-axis
Example3_yGood_xBad.png (105.2 KiB) Viewed 7103 times

Re: Auto tick marks at "zero" not exact

Posted: Thu Oct 24, 2013 10:26 pm
by ArctionPasi
Try setting FormatValueLabel event handler for the axes, and do rounding to zero for the input value before string conversion.

That should work.

Re: Auto tick marks at "zero" not exact

Posted: Thu Oct 24, 2013 10:50 pm
by ShawnCG
That worked very nicely. Thanks!