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 DevExpress.XtraCharts.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.
C# |
using DevExpress.XtraCharts;
private void Form1_Load(object sender, EventArgs e) {
ChartControl scatterLineChart = new ChartControl();
Series series1 = new Series("Series 1", ViewType.ScatterLine);
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));
scatterLineChart.Series.Add(series1);
series1.ArgumentScaleType = ScaleType.Numerical;
((ScatterLineSeriesView)series1.View).LineStyle.DashStyle = DashStyle.Dash;
((XYDiagram)scatterLineChart.Diagram).EnableAxisXZooming = true;
scatterLineChart.Legend.Visible = false;
scatterLineChart.Titles.Add(new ChartTitle());
scatterLineChart.Titles[0].Text = "A Scatter Line Chart";
scatterLineChart.Dock = DockStyle.Fill;
this.Controls.Add(scatterLineChart);
}
|
VB |
Imports DevExpress.XtraCharts
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Dim scatterLineChart As New ChartControl()
Dim series1 As New Series("Series 1", ViewType.ScatterLine)
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))
scatterLineChart.Series.Add(series1)
series1.ArgumentScaleType = ScaleType.Numerical
CType(series1.View, ScatterLineSeriesView).LineStyle.DashStyle = DashStyle.Dash
CType(scatterLineChart.Diagram, XYDiagram).EnableAxisXZooming = True
scatterLineChart.Legend.Visible = False
scatterLineChart.Titles.Add(New ChartTitle())
scatterLineChart.Titles(0).Text = "A Scatter Line Chart"
scatterLineChart.Dock = DockStyle.Fill
Me.Controls.Add(scatterLineChart)
End Sub
|