One of the more important objects in C1Chart is the ChartDataSeries. The data series contains all of the data to be included in the chart and many important data-related properties.
The ChartDataSeries is contained in the SeriesList collection of the ChartData object, which is an object of the ChartGroup:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1Chart1.ChartGroups.ChartGroupsCollection(0).ChartData.SeriesList(0) |
To write code in C#
C# |
Copy Code
|
---|---|
c1Chart1.ChartGroups.ChartGroupsCollection[0].ChartData.SeriesList[0]; |
The series object is crucial for data and data access for two reasons:
Note that the number of points in a series is the number of elements of the longest data array object applicable to the series. For example, an XY-Plot uses X and Y arrays. If X has five elements and Y has three elements, then the number of points is five, and the last two elements of Y are assumed to be data holes. Even if the Y1 array has ten elements, the number of points is five because an XY-Plot does not use the Y1 array. However, if the chart type is changed to HiLo, then X, Y and Y1 are all used and so the number of points would be ten, and both the X and Y arrays would be assumed to contain data holes in the missing elements.