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

...

Description

Excerpt

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

Signature
C#
C#
[DefaultMember("Item")]
 public sealed class SeriesCollection : System.Collections.Generic.IEnumerable<Series>
{signature}{signature:
}
Signature
vb.net
vb.net
<DefaultMember("Item")> _
	Public NotInheritable Class SeriesCollection
		Implements System.Collections.Generic.IEnumerable(Of Series)
{signature}
{remarks}
To return a {{SeriesCollection}} object, use [
Remarks

To return a SeriesCollection object, use Chart.SeriesCollection

|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|ChartType] 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|ChartType.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|ChartType.ChartCategory] cannot coexist on the same axis. If you add a series to an axis that already has series of the same [ChartCategory|ChartType.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. {remarks} {properties} || Name || Description || | [CategoryData|SeriesCollection.CategoryData] | {excerpt-include:SeriesCollection.CategoryData|nopanel=true} | | [Count|SeriesCollection.Count]\\ | {excerpt-include:SeriesCollection.Count|nopanel=true} | | [SecondaryCategoryData|SeriesCollection.SecondaryCategoryData]\\ | {excerpt-include:SeriesCollection.SecondaryCategoryData|nopanel=true} | {indexers} || Name || Description || | [Item(Int32)|SeriesCollection.Item(Int32)]\\ | {excerpt-include:SeriesCollection.Item(Int32)|nopanel=true} | {methods} || Name || Description || | [CreateSeries(Area)|SeriesCollection.CreateSeries(Area)]\\ | {excerpt-include:SeriesCollection.CreateSeries(Area)|nopanel=true} | | [CreateSeries(Area, ChartType, AxisType)|SeriesCollection.CreateSeries(Area, ChartType, AxisType)]\\ | {excerpt-include:SeriesCollection.CreateSeries(Area, ChartType, AxisType)|nopanel=true} | | [CreateSeries(Range)|SeriesCollection.CreateSeries(Range)]\\ | {excerpt-include:SeriesCollection.CreateSeries(Range)|nopanel=true} | | [CreateSeries(Range, ChartType, AxisType)|SeriesCollection.CreateSeries(Range, ChartType, AxisType)]\\ | {excerpt-include:SeriesCollection.CreateSeries(Range, ChartType, AxisType)|nopanel=true} | | [CreateSeries(String)|SeriesCollection.CreateSeries(String)]\\ | {excerpt-include:SeriesCollection.CreateSeries(String)|nopanel=true} | | [CreateSeries(String, ChartType, AxisType)|SeriesCollection.CreateSeries(String, ChartType, AxisType)]\\ | {excerpt-include:SeriesCollection.CreateSeries(String, ChartType, AxisType)|nopanel=true} | | [GetEnumerator()|SeriesCollection.GetEnumerator()]\\ | {excerpt-include:SeriesCollection.GetEnumerator()|nopanel=true} | | [Remove(Int32)|SeriesCollection.Remove(Int32)]\\ | {excerpt-include:SeriesCollection.Remove(Int32)|nopanel=true} | | [Remove(Series)|SeriesCollection.Remove(Series)]\\ | {excerpt-include:SeriesCollection.Remove(Series)|nopanel=true} |

.

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
SeriesCollection.CategoryData
SeriesCollection.CategoryData
nopaneltrue

Count

Excerpt Include
SeriesCollection.Count
SeriesCollection.Count
nopaneltrue

SecondaryCategoryData

Excerpt Include
SeriesCollection.SecondaryCategoryData
SeriesCollection.SecondaryCategoryData
nopaneltrue
Indexers

Name

Description

Item(Int32)

Excerpt Include
SeriesCollection.Item(Int32)
SeriesCollection.Item(Int32)
nopaneltrue
Methods

Name

Description

CreateSeries(Area)

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

CreateSeries(Area, ChartType, AxisType)

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

CreateSeries(Range)

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

CreateSeries(Range, ChartType, AxisType)

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

CreateSeries(String)

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

CreateSeries(String, ChartType, AxisType)

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

GetEnumerator()

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

Remove(Int32)

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

Remove(Series)

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