Hi James,
The zoom information is stored in the PagingView object attached to the axis. In order to save / restore the zoom level for a particular axis you can clone the view object and then assign it later to the axis when you want to restore the zoom to a previous state. The following code example shows how to do that:
private void Form1_Load(object sender, EventArgs e)
{
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.RangeSelections.Add(new NRangeSelection());
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
nChartControl1.Controller.Tools.Add(new NPanelSelectorTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());
}
NAxisPagingView xView;
NAxisPagingView yView;
private void button1_Click(object sender, EventArgs e)
{
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
xView = (NAxisPagingView)chart.Axis(StandardAxis.PrimaryX).PagingView.Clone();
yView = (NAxisPagingView)chart.Axis(StandardAxis.PrimaryY).PagingView.Clone();
}
private void button2_Click(object sender, EventArgs e)
{
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.Axis(StandardAxis.PrimaryX).PagingView = (NAxisPagingView)xView.Clone();
chart.Axis(StandardAxis.PrimaryY).PagingView = (NAxisPagingView)yView.Clone();
nChartControl1.Refresh();
}
Hope we helped - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team