FlexChart > Working with FlexChart > FlexChart Elements > FlexChart Series > Creating and Adding Series |
By default, FlexChart for WPF displays three series containing dummy data at design-time as well as run-time. However, you can provide your own data and display the series with that 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. So if you want to add more series, you can do so by performing any of the methods mentioned below.
Perform the following steps to create and add a series in FlexChart at design-time:
By default, FlexChart contains three series added in the Series collection. Thus, Series Collection Editor appears with the pre-added series. |
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.
C# |
Copy Code
|
---|---|
C1.WPF.Chart.Series series4 = new C1.WPF.Chart.Series();
flexChart.Series.Add(series4);
|