ScatterLineSeriesView Class
Represents a series view of the Scatter Line type.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
Remarks
The ScatterLineSeriesView class provides the functionality of a series view of the Scatter Line type within a chart control.
In fact, the scatter line chart is a Line chart, whose points are not sorted by their arguments, and are drawn in the same sequence in which they appear in the collection. For this reason, the main properties exposed by the ScatterLineSeriesView class are inherited from the LineSeriesView class, and provide similar functionality.
Note that a particular view type can be defined for a series via its SeriesBase.View property.
For more information on series views of the scatter line type, please see the Scatter Line Chart topic.
Example
The following example demonstrates how to create a ChartControl with a series of the ScatterLineSeriesView
type, and add this chart to a form at runtime. Note that for this particular scale type only, it’s typical that series points aren’t sorted by their arguments, but are instead displayed in the order in which they are added to the collection.
Before proceeding with this example, first create a Windows Forms Application in Visual Studio, and include all necessary assemblies to the References list of your project. Then, add the following code to the Form.Load event handler.
using DevExpress.XtraCharts;
// ...
private void Form1_Load(object sender, EventArgs e) {
// Create a new chart.
ChartControl scatterLineChart = new ChartControl();
// Create a scatter line series.
Series series1 = new Series("Series 1", ViewType.ScatterLine);
// Add points to it.
series1.Points.Add(new SeriesPoint(1, 2));
series1.Points.Add(new SeriesPoint(2, 10));
series1.Points.Add(new SeriesPoint(3, 4));
series1.Points.Add(new SeriesPoint(4, 12));
series1.Points.Add(new SeriesPoint(1.5, 17));
series1.Points.Add(new SeriesPoint(2.5, 3));
series1.Points.Add(new SeriesPoint(3.5, 14));
series1.Points.Add(new SeriesPoint(2, 6));
// Add the series to the chart.
scatterLineChart.Series.Add(series1);
// Set the numerical argument scale types for the series,
// as it is qualitative, by default.
series1.ArgumentScaleType = ScaleType.Numerical;
// Access the view-type-specific options of the series.
((ScatterLineSeriesView)series1.View).LineStyle.DashStyle = DashStyle.Dash;
// Access the type-specific options of the diagram.
((XYDiagram)scatterLineChart.Diagram).EnableAxisXZooming = true;
// Hide the legend (if necessary).
scatterLineChart.Legend.Visible = false;
// Add a title to the chart (if necessary).
scatterLineChart.Titles.Add(new ChartTitle());
scatterLineChart.Titles[0].Text = "A Scatter Line Chart";
// Add the chart to the form.
scatterLineChart.Dock = DockStyle.Fill;
this.Controls.Add(scatterLineChart);
}