Group: Forum Members
Last Active: 8 Years Ago
Posts: 61,
Visits: 35
|
Hi,
I am trying to set an X axis data cursor tool on my graph.
I am using this code, but it does not seems to be working, could you please tell me what I am missing?
//data cursor tool NDataCursorTool m_DataCursorTool = new NDataCursorTool();
m_VerticalAxisCursor = new NAxisCursor(); m_VerticalAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryX; m_VerticalAxisCursor.ValueChanged += new EventHandler(OnValueChanged);
m_VerticalAxisCursor.ValueSnapper = new NAxisMinorTickSnapper(); m_Chart.Axis(StandardAxis.PrimaryX).Cursors.Clear(); m_Chart.Axis(StandardAxis.PrimaryX).Cursors.Add(m_VerticalAxisCursor);
m_VerticalAxisCursor.SynchronizeOnMouseAction = MouseAction.None; m_VerticalAxisCursor.SynchronizeOnMouseAction |= MouseAction.Move;
nChartControl1.Controller.Tools.Add(m_DataCursorTool);
My class which is handling the graph and the graph object in to separate classes, I do not know if thtat makes any difference or not because of the mouse move event.
Regards Daniel
|