SeriesCollection.Add Method (String)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Adds a Series object to the end of the collection.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

public Series Add(
	string name
)

Parameters

name
Type: System.String

The name of the Series to be added.

Return Value

Type: System.Windows.Forms.DataVisualization.Charting.Series

The new Series object appended to the collection..

Items are always added as the last item in the collection.

The name argument refers to the Name property of the object being added.

Note   If you use this method to add Series objects to the SeriesCollection class, the associated DataPoint objects of the newly added Series object cannot have more than one Y-value per data point. To add a series that can handle multiple Y-values per data point, use the M:System.Windows.Forms.DataVisualization.Charting.SeriesCollection.Add(System.String, System.Int32) definition of this overloaded method.

.NET Framework
Available since 4.0
Return to top
Show: