Hi Daniel,
The begin end axis should the primary Y (or another vertical axis) as you add the cursor to the x axis:
verticalAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryY;
Also make sure that m_Chart and nChartControl1.Charts[0] actually refer to the same chart.
We tested with the following code:
private void Form1_Load(object sender, EventArgs e)
{
NDataCursorTool dataCursorTool = new NDataCursorTool();
NAxisCursor verticalAxisCursor = new NAxisCursor();
verticalAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryY;
verticalAxisCursor.ValueSnapper = new NAxisMinorTickSnapper();
NChart chart = nChartControl1.Charts[0];
chart.Axis(StandardAxis.PrimaryX).Cursors.Clear();
chart.Axis(StandardAxis.PrimaryX).Cursors.Add(verticalAxisCursor);
verticalAxisCursor.SynchronizeOnMouseAction = MouseAction.None;
verticalAxisCursor.SynchronizeOnMouseAction |= MouseAction.Move;
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
nChartControl1.Controller.Selection.SelectedObjects.Add(chart);
nChartControl1.Controller.Tools.Add(dataCursorTool);
}
and it was working OK.
Best Regards,
Nevron Support Team