Products
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 Line in C#

Line Series of Chart for WinForms C# Tutorial

The Series Types of Chart View is a collection of Chart Series, including Area, Spline Area, Bar, Line, Spline, Scatter point, Combined series. The Chart control provides two primary functions to Chart series. One is a collection used to stand for the specific data and the other is to visualize the data by using a predefined model. The following are the series types that the Chart support, including Bar, Pie, Line, Area, Donut, Scatter, Polar, Stock, Radar, Categorical or Polar.
The Line Series is able to position the data points of the Categorical on Cartesian Area. The Line Series position the data points by using one categorical and one numerical axis. The Positioned points can be connected with the straight lines or large smooth curves.

How to Customize Line Series

The following C# code shows how to customize the line series

LineSeries lineSeries = new LineSeries();
lineSeries.DataPoints.Add(new CategoricalDataPoint(15, "Mar"));
lineSeries.DataPoints.Add(new CategoricalDataPoint(28, "May"));
lineSeries.DataPoints.Add(new CategoricalDataPoint(11, "Aug"));
lineSeries.DataPoints.Add(new CategoricalDataPoint(29, "Nov"));
this.chart1.Series.Add(lineSeries);

LineSeries lineSeries2 = new LineSeries();
lineSeries2.DataPoints.Add(new CategoricalDataPoint(28, "Feb"));
lineSeries2.DataPoints.Add(new CategoricalDataPoint(25, "Jun"));
lineSeries2.DataPoints.Add(new CategoricalDataPoint(12, "Oct"));
lineSeries2.DataPoints.Add(new CategoricalDataPoint(29, "Dec"));
this.chart1.Series.Add(lineSeries2);

Properties of Line Series for Chart

  • BorderWidth, the property is used for setting the thickness of the lines
  • PointSize, the property is used for setting the point size
  • DisplayLabels, a Boolean property, used for determining the labels above each point will be visible
  • Spline, the property is used for drawing straight lines or smooth curves for the series
  • SplineTension, the property is used for setting the tension of the spline. The value of Spline should be true when customizing the SplineTension property
  • CombineMode, this is a common property used for all categorical series, which introduces a mechanism for combining data points that reside in different series without the same category. The available valid value contains None, Cluster, Stack and Stack100.
  • None, a value of the CombineMode, used for plotting the series independent from each other
  • Cluster, a value of the CombineMode, used for displaying data points in the same category
  • Stack, a value of the CombineMode, used for plotting plots the points on top of each other
  • Stack100, a value of the CombineMode, used for displaying the percentage value
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