Add Cursot to a surface chart


Author
Message
Giulio Certo
Giulio Certo
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)
Group: Forum Members
Posts: 1, Visits: 1

I've a surface chart with one serie of data; I try to add a cursor tool following your example but I'm not able to show anything. What is wrong?
Thank you very much
This is my code snippet:

// setup Y axis
chart.Axis(StandardAxis.PrimaryY).Visible = false;

// setup X axis
NAxis axisX = chart.Axis(StandardAxis.PrimaryX);
axisX.Anchor =
new NDockAxisAnchor(AxisDockZone.FrontTop);
NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator();
scaleX.InnerMajorTickStyle.Visible =
false;
scaleX.RoundToTickMin =
false;
scaleX.RoundToTickMax =
false;
axisX.ScaleConfigurator = scaleX;

// setup Z axis
NAxis axisZ = chart.Axis(StandardAxis.Depth);
axisZ.Anchor =
new NDockAxisAnchor(AxisDockZone.TopLeft);
NLinearScaleConfigurator scaleZ = new NLinearScaleConfigurator();
scaleZ.InnerMajorTickStyle.Visible =
false;
scaleZ.MajorGridStyle.ShowAtWalls =
new ChartWallType[0];
scaleZ.RoundToTickMin = false;
scaleZ.RoundToTickMax =
false;
axisZ.ScaleConfigurator = scaleZ;

// add a surface series
surface = (NGridSurfaceSeries)chart.Series.Add(SeriesType.GridSurface);
surface.Name =
"Contour";
surface.Legend.Mode = SeriesLegendMode.SeriesLogic;
surface.ValueFormatter =
new NNumericValueFormatter("0.000");
surface.FillMode =
SurfaceFillMode.Zone;
surface.FrameMode =
SurfaceFrameMode.Contour;
surface.ShadingMode =
ShadingMode.Flat;
surface.DrawFlat =
true;

//add cursor
NInteractivityStyle curStyle = new NInteractivityStyle();
curStyle.Cursor =
new NCursorAttribute(CursorType.Cross);
m_HorizontalAxisCursor =
new NAxisCursor();
m_HorizontalAxisCursor.BeginEndAxis = (
int)StandardAxis.PrimaryX;
m_HorizontalAxisCursor.ValueChanged +=
new EventHandler(OnValueChanged);
m_HorizontalAxisCursor.SynchronizeOnMouseAction |=
MouseAction.Down;
m_HorizontalAxisCursor.InteractivityStyle = curStyle;
chart.Axis(
StandardAxis.PrimaryX).Cursors.Add(m_HorizontalAxisCursor);
m_VerticalAxisCursor =
new NAxisCursor();
m_VerticalAxisCursor.BeginEndAxis = (
int)StandardAxis.Depth;
m_VerticalAxisCursor.ValueChanged +=
new EventHandler(OnValueChanged);
m_VerticalAxisCursor.SynchronizeOnMouseAction |=
MouseAction.Down;
m_VerticalAxisCursor.InteractivityStyle = curStyle;
chart.Axis(StandardAxis.Depth).Cursors.Add(m_VerticalAxisCursor);

// add selector and data cursor tool
nChart.Controller.Tools.Add(new NSelectorTool());
nChart.Controller.Tools.Add(new NDataCursorTool());


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search