$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Chart Control for C# Windows Forms
Design Bar, Pie, Line, Area, Polar, Radar and Scatter for C# Windows Forms application
Home > WinForms UI Controls > User Manual > Chart Series ScatterLine in C#

Scatter Line of Chart for WinForms C# Tutorial

The Scatter Line Series are able to plot the data that determine a line against two linear axes. The XValue and YValue control each point of a line in the chart. The XValue is to control the horizontal axis of the point of a line and the YValue is to control the vertical axis of the point of a line respectively. The Scatter Line chart type is really similar with the mathematical Cartesian coordinate system.

How to Create Chart with Lines in C#


ScatterLineSeries scatterSeries = new ScatterLineSeries();
scatterSeries.DataPoints.Add(new ScatterDataPoint(9, 13));
scatterSeries.DataPoints.Add(new ScatterDataPoint(9, 5));
scatterSeries.DataPoints.Add(new ScatterDataPoint(7, 8));
scatterSeries.DataPoints.Add(new ScatterDataPoint(5, 4));
scatterSeries.DataPoints.Add(new ScatterDataPoint(10, 4));
scatterSeries.PointSize = new SizeF(8, 8);
this.chart1.Series.Add(scatterSeries);

ScatterLineSeries scatterSeries2 = new ScatterLineSeries();
scatterSeries2.DataPoints.Add(new ScatterDataPoint(6, 12));
scatterSeries2.DataPoints.Add(new ScatterDataPoint(10, 18));
scatterSeries2.DataPoints.Add(new ScatterDataPoint(8, 5));
scatterSeries2.DataPoints.Add(new ScatterDataPoint(9, 11));
scatterSeries2.DataPoints.Add(new ScatterDataPoint(10, 15));
scatterSeries2.Shape = new RoundRectShape(1);
scatterSeries2.PointSize = new SizeF(8, 8);
this.chart1.Series.Add(scatterSeries2);

Properties of the Scatter Line Series

  • Scatter Line Series is the descendent property of Scatter Series and inherit all key properties
  • Spline, an additional Boolean property used to draw straight lines of smooth curves
  • SplineTension, the property is used for setting the tension of the spline. The value of Spline should be true when customizing the SplineTension property. The below C# Code shows how to customize the Spline Tension.

scatterSeries.Spline = true;
scatterSeries.SplineTension = 0.6f;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls