Nevron .NET Vision Documentation
XY Scatter Series Functionality

The NXYScatterSeries class is the base class of all series that provide XY scatter functionality. It is derived from the NSeries class and extends its capabilities with the following features:
X Values Data Series
The XValues data series contains double values that determine the positions of the data points along the X axis. This data series is accessible through the XValues property of the NXYScatterSeries object.
Control over the usage of the X Values

The UseXValues property of the NXYScatterSeries object controls whether the series will use the custom X positions or use the default ones (equal to the data point index e.g. 0, 1, 2 ... n). By default this property is set to false. The following code will enable the custom X positions of the data points:

Copy Code
series.UseXValues = true;
Visual Basic
Copy Code
series.UseXValues = True
Formatting Commands

The NXYScatterSeries class extends the formatting commands set inherited from the NSeries base class with the following formatting commands:

<xvalue> - the current data point X value (extracted from the XValues data series)

Notes on scaling

The X values affect the scale of the X axis. By default all series are scaled on the PrimaryX axis, which operates in Ordinal scale mode. If you display XY scatter charts it is recommended that you change the scaling mode to Numeric, DateTime or Logarithmic. The following code demonstrates how to do this:

Copy Code
NChart chart = chartControl.Charts[0];
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NLinearScaleConfigurator();

NPointSeries series = (NPointSeries)chart.Series.Add(SeriesType.Point);
series.UseXValues = true;
Visual Basic
Copy Code
Dim chart As NChart = chartControl.Charts(0)
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = New NLinearScaleConfigurator
Dim series As NPointSeries = chart.Series.Add(SeriesType.Point)
series.UseXValues = True

Please refer to the Axis scaling topic for more information.


See Also



©2017. Nevron Software LLC.

Send Feedback