ComponentOne FlexChart for WinForms
Creating and Adding Series
FlexChart > Working with FlexChart > FlexChart Elements > Series > Creating and Adding Series

By default, FlexChart displays one series at design-time. However, the control doesn't display the series at run-time until the chart is provided with data. For information on how to provide data to FlexChart, refer to Providing Data.

FlexChart enables you to create and add a series at design-time as well as run-time.

At Design-Time

Perform the following steps to create and add a series in FlexChart at design-time:

  1. In the Properties window, navigate to the Series field.
  2. Click the Ellipsis button next to the Series field.
    Series Collection Editor appears.
    By default, FlexChart contains one series added in the Series collection. Thus, Series Collection Editor appears with a pre-added series, Series 1 .
  3. Click the Add button to add an additional series in the Series collection.
  4. Repeat step 3 to add the required number of series.
  5. Click the OK button.

At Run-Time

At run-time, you first need to create a series by using the Series object. And then, you need to add the series to the FlexChart Series collection using the Add method in the FlexChart.Series collection property.

The following code shows how to create and add a series in FlexChart at run-time.

' create series
Dim series1 As New C1.Win.Chart.Series()
Dim series2 As New C1.Win.Chart.Series()

' add the series
// create series
C1.Win.Chart.Series series1 = new C1.Win.Chart.Series();
C1.Win.Chart.Series series2 = new C1.Win.Chart.Series();

// add the series