Hi Praf,
I'm not quite sure what the problem is - as the BeginValue and EndValue properties of the scrollbar actually define the thumb range on the axis - I tested with the following code:
private void Form1_Load(object sender, EventArgs e)
{
// configure chart
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.RangeSelections.Add(new NRangeSelection());
// add dummy data
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
// show scroll bars and intercept begin/value change
chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true;
chart.Axis(StandardAxis.PrimaryY).ScrollBar.Visible = true;
chart.Axis(StandardAxis.PrimaryY).ScrollBar.ViewRangeChanged += new EventHandler(ScrollBar_ViewRangeChanged);
// configure interactivity
nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());
}
void ScrollBar_ViewRangeChanged(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
label1.Text = chart.Axis(StandardAxis.PrimaryY).ScrollBar.BeginValue.ToString();
label2.Text = chart.Axis(StandardAxis.PrimaryY).ScrollBar.EndValue.ToString();
}
Note that you can also handle Range changed event which is fired when either the begin or end of the scrollbar range is changed.
Hope this helps - let me know if you have any questions or comments.
Best regards,
Bob