Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Excerpt

The SeriesCollection class contains the set of data series in a worksheetgiven chart.

Signature
C#
C#
[DefaultMember("Item")]
 public sealed class SeriesCollection : System.Collections.Generic.IEnumerable<Series>

...

Remarks

To return a SeriesCollection object, use Chart.SeriesCollection.

A SeriesCollection is made up all of the series in a chart. These series may be of the same type or a different type from the chart itself; a chart may contain series of multiple ChartTypes on different axes. However, not all series configurations are valid.

Surface, bubble, and 3D series may not be combined on a chart with series of a different ChartCategory. For example, a Bubble chart may contain both 2D and 3D Bubble series, but may not contain any Line series. Similarly, a 3D Area chart may contain 3D area series, but may not contain any other series types. Additionally, these chart types may not have any series on the Secondary axis.

Pie, Doughnut, Bar, and Radar charts can be combined with series of other chart categories, but only if the other series is on a different axis. For example, a bar series on the primary axis can be in the same chart as a column series on the secondary axis, but it cannot be in the same chart as a column series on the primary axis.

If you attempt to create a series that would violate these constraints, or change a series configuration such that these constraints would no longer be followed, then an ArgumentException will be thrown.

A last consideration is that for all series types except for Bubble and Pie series, series within the same ChartCategory cannot coexist on the same axis. If you add a series to an axis that already has series of the same ChartCategory but different ChartType, the existing series will be converted to the new ChartType. For example, if you have a StandardLine series on the primary axis, and you create a new StackedLine series on the primary axis, both series will now be StackedLine series. If you had added it to the secondary axis, however, then you would have one StandardLine series on the primary axis, and one StackedLine series on the secondary axis.

Properties

Name

Description

CategoryData

Excerpt Include
EW8:SeriesCollection.CategoryDataEW8:
SeriesCollection.CategoryData
nopaneltrue

Count

Excerpt Include
EW8:SeriesCollection.CountEW8:
SeriesCollection.Count
nopaneltrue

SecondaryCategoryData

Excerpt Include
EW8:SeriesCollection.SecondaryCategoryDataEW8:
SeriesCollection.SecondaryCategoryData
nopaneltrue

...

Name

Description

Item(Int32)

Excerpt Include
EW8:SeriesCollection.Item(Int32)EW8:
SeriesCollection.Item(Int32)
nopaneltrue

...

Name

Description

CreateSeries(Area)

Excerpt Include
EW8:SeriesCollection.CreateSeries(Area)EW8:
SeriesCollection.CreateSeries(Area)
nopaneltrue

CreateSeries(Area, ChartType, AxisType)

Excerpt Include
EW8:SeriesCollection.CreateSeries(Area, ChartType, AxisType)EW8:
SeriesCollection.CreateSeries(Area, ChartType, AxisType)
nopaneltrue

CreateSeries(Range)

Excerpt Include
EW8:SeriesCollection.CreateSeries(Range)EW8:
SeriesCollection.CreateSeries(Range)
nopaneltrue

CreateSeries(Range, ChartType, AxisType)

Excerpt Include
EW8:SeriesCollection.CreateSeries(Range, ChartType, AxisType)EW8:
SeriesCollection.CreateSeries(Range, ChartType, AxisType)
nopaneltrue

CreateSeries(String)

Excerpt Include
EW8:SeriesCollection.CreateSeries(String)EW8:
SeriesCollection.CreateSeries(String)
nopaneltrue

CreateSeries(String, ChartType, AxisType)

Excerpt Include
EW8:SeriesCollection.CreateSeries(String, ChartType, AxisType)EW8:
SeriesCollection.CreateSeries(String, ChartType, AxisType)
nopaneltrue

GetEnumerator()

Excerpt Include
EW8:SeriesCollection.GetEnumerator()EW8:
SeriesCollection.GetEnumerator()
nopaneltrue

Remove(Int32)

Excerpt Include
EW8:SeriesCollection.Remove(Int32)EW8:
SeriesCollection.Remove(Int32)
nopaneltrue

Remove(Series)

Excerpt Include
EW8:SeriesCollection.Remove(Series)EW8:
SeriesCollection.Remove(Series)
nopaneltrue