Profile Picture

Axis configuration question - exact tick count

Posted By Vladimir Bershadsky 11 Years Ago
Author
Message
Vladimir Bershadsky
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 15, Visits: 1

Hi!

Please tell me how do I configure axis to appear as follows:

- axis view range is divided with major ticks and grid lines to exact number of intervals, with axis label centered around major tick mark

- axis labels appear also on the beginning and the end of range

- on data zoom this configuration is preserved, i.e. axis automatically adjust itself to divide new (zoomed) view range to specified number of intervals.

For now I'm using NDateTimeScaleConfigurator for X-axis and NLinearScaleConfigurator for Y-axis with:

   scaleConfigurator.MajorTickMode = MajorTickMode.AutoMaxCount;

   scaleConfigurator.MaxTickCount = numberOfIntervals;

Control documentation mentions NDensityRange class, which seems like possible solution, but I've failed to get to desired results with manual axis programming.

Please help!

Thank you in advance,

Vladimir

P.S.: Nevron Chart is v2012Vol1 Enterprise.

 


Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 8 hours ago
Posts: 3,054, Visits: 4,012

Hi Vladimir,

Did you try the RoundToTickMin / Max feature - it allows you to tell an axis that it must end on an exact tick value:

NDateTimeScaleConfigurator dtScale = new NDateTimeScaleConfigurator();

dtScale.RoundToTickMax = true;
dtScale.RoundToTickMix = true;

...

It is not a very good idea to fix the number of ticks to a specified value, because they may not be sufficient to produce good decoration, or the step may not be a good number (the chart tries to always set a “good” value 1, 5, 10 or the like) and in the case of date / time units a value which is a multiple of month, day, week or other date time unit, depending on factors such as chart size on screen, range of values and of course scale settings for major tick. If the above solution does not work for you please sends us a screenshot (or sketch) of this chart to support@nevron.com.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic