Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Axis ticks and zoom/scroll
posted

Let's say I have a series of value/time datapoints, the Y axis min value is 5.012 and max value is 6.231.

I can force the tick values to be at round intervals by setting

chart.Axis.Y.NumericAxisType = Infragistics.UltraChart.Shared.Styles.NumericAxisType.Linear;
chart.Axis.Y.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;
chart.Axis.Y.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.DataInterval;
chart.Axis.Y.RangeMin = 5.0;
chart.Axis.Y.RangeMax = 6.25;
chart.Axis.Y.TickmarkInterval = 0.25;

So that ticks/labels appear at 

5.0, 5.25, 5.50, ...6.0, 6.25

If I zoom in and then scroll, the tick interval stays the same (ok), but the tick values shifts (e.g. 5.11, 5.36, 5.61,...).
It seems that they are always computed based
on the first value in the display window (i.e. IAdvanceAxis.WindowMinimum for the current scale/scroll) rather than the global range minimum
Axis.RangeMin).

In other words, the ticks/grid line are relative to the axis current display area rather than absolute - the first displayed tick is always gonna
be based on the very first value in the window, rather than being the first [RangeMax + n * TickmarkInterval] that's within the currently displayed
range.

Is there a way around this so that the tick values are still within the set [5.0, 5.25,...6.25] regardless of zoom/scroll values?

 

Parents Reply Children
No Data