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.
Perform the following steps to create and add a series in FlexChart at design-time:
![]() |
By default, FlexChart contains one series added in the Series collection. Thus, Series Collection Editor appears with a pre-added series, Series 1 . |
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 FlexChart1.Series.Add(series1) FlexChart1.Series.Add(series2)
// 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 flexChart1.Series.Add(series1); flexChart1.Series.Add(series2);