Hi Kevin,
The scale range is recalculated when the control is recalculated. You can force recalculation when you receive the EndZoom event and then retrieve the range - for example:
private void Form1_Load(object sender, EventArgs e)
{
N
CartesianChart chart = (N
CartesianChart)n
ChartControl1.
Charts[0];
chart.RangeSelections.Add(new NRangeSelection());
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(20);
chart.Series.Add(bar);
n
ChartControl1.Controller.Tools.Add(new NPanelSelectorTool());
N
DataZoomTool
dataZoomTool = new N
DataZoomTool();
dataZoomTool.EndDrag +=
DataZoomTool_EndDrag;
n
ChartControl1.Controller.Tools.Add(
dataZoomTool);
}
private void
DataZoomTool_EndDrag(object sender, EventArgs e)
{
N
DataZoomTool
dataZoomTool = (N
DataZoomTool)sender;
n
ChartControl1.RecalcLayout();
NRange1DD range = n
ChartControl1.
Charts[0].Axis(StandardAxis.PrimaryX).Scale.RulerRange;
Trace.WriteLine("X:" + range.Begin.ToString() + ", Y:" + range.End.ToString());
}
Let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team