Hi Inhyuk,
The problem with the code below is that the paging view will internally clip the range you specify to the currently valid axis range. At creation time the chart does not know the valid range (it is 0) as it has not calculated yet. You can force the control to recalculate / layout - the following code shows how to achieve this:
private void Form1_Load(object sender, EventArgs e)
{
Random random = new Random();
NChart chart = nChartControl1.Charts[0];
NLineSeries line = (NLineSeries)chart.Series.Add(SeriesType.Line);
line.DataLabelStyle.Visible = false;
line.Values.FillRandom(random, 100);
// force control to recalculate
nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);
chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true;
chart.Axis(StandardAxis.PrimaryX).PagingView.Enabled = true;
chart.Axis(StandardAxis.PrimaryX).PagingView.ViewRange = new NRange1DD(0, 50);//It doesn't work.
nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Refresh();
}
Let me know if you meet any probelms...
Best regards,
Bob