Hello!
I am using Nevron Chart (v2012Vol1 Enterprise) to draw some measure-over-time 2D line graphs. Data Zooming Tool is used to provide user with basic zoom capabilities. Now I want to prevent user from going too deep with zooming. For example, to limit x-axis zoom to 1 second and y-axis (values) zoom to 0.0001, and if user selects lesser range, prevent zoom from happening. I tried this code to set minimal values of NRangeSelection object:
chartControl.Charts[0].RangeSelections.Clear(); NRangeSelection rangeSelection = new NRangeSelection(); rangeSelection.HorizontalValueSnapper = new NAxisRulerClampSnapper(); rangeSelection.VerticalValueSnapper = new NAxisRulerClampSnapper(); double oaSecond = DateTime.Today.AddSeconds(1).ToOADate() - DateTime.Today.ToOADate(); rangeSelection.MinHorizontalPageSize = oaSecond; rangeSelection.MinVerticalPageSize = 0.001; rangeSelection.ZoomOutResetsAxis = false; chartControl.Charts[0].RangeSelections.Add(rangeSelection);
but this didn't help. It seems like even when user selects lesser range (for example, 0.00001 on vertical axis), Chart control still perfoms zoom-in for vertical axis.
Hi Vladimir,
We think the control is working properly - the begin value of the y axis is:
1.5940
assuming you've set 0.001 as max zoom length the minimum value for the axis range end can be 1.5950 and the value is bigger than that so it works correctly...
Best Regards,Nevron Support Team