windowsforms-5795-controls-and-libraries-chart-control-provide-data-create-a-series-manually.md
This document describes how to add a new series to the chart manually and consists of the following sections:
Note
Use one of following approaches to add a series at design time:
Using the Properties Window
Using the Chart Designer
Using the Smart Tag
Note that series are only displayed if they have at least one data point. The Chart control provides two approaches to populate the series with points:
The following code demonstrates how to add a series at runtime manually:
// The series has the constructor that specifies the view
// that the series would use.
Series series = new Series("2015", ViewType.Bar);
chartControl.Series.Add(series);
' The series has the constructor that specifies the view
' that the series would use.
Dim series As Series = New Series("2015", ViewType.Bar)
chartControl.Series.Add(series)
After that fill a series with data using one of the ways: add points to a series manually or bind series to a data source.
The code above uses the following classes and members:
| Symbol | Description |
|---|---|
| Series | Represents an individual series within a chart control. |
| ChartControl.Series | Provides access to the chart control’s collection of series objects. |
See Also