Auto tick marks at "zero" not exact

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Auto tick marks at "zero" not exact

Post by ShawnCG » Thu Oct 24, 2013 9:13 pm

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 6975 times
Example showing bad behavior on y-axis
Example showing bad behavior on y-axis
Example2_xGood_yBad.png (104.42 KiB) Viewed 6975 times
Example showing bad behavior on x-axis
Example showing bad behavior on x-axis
Example3_yGood_xBad.png (105.2 KiB) Viewed 6975 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Auto tick marks at "zero" not exact

Post by ArctionPasi » Thu Oct 24, 2013 10:26 pm

Try setting FormatValueLabel event handler for the axes, and do rounding to zero for the input value before string conversion.

That should work.
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Auto tick marks at "zero" not exact

Post by ShawnCG » Thu Oct 24, 2013 10:50 pm

That worked very nicely. Thanks!

Post Reply