Adds a series to a chart. Creates a new, empty series and place it at the end of the current series list.

object.AddSeries 

Arguments

object
Required. A Chart object.

Remarks

The AddSeries method places the newly created series at the end of the chart object series list. You can retrieve the number of existing series added to the chart object by calling the GetSeriesCount method.

VBScript Code Sample

The following VBScript code illustrates use of the AddSeries method.

Dim values_1(2)
Dim values_2(2)

values_1(0) = 10
values_1(1) = 20
values_1(2) = 30

values_2(0) = 100
values_2(1) = 200
values_2(2) = 300

chart.AddSeries
chart.SetSeriesValuesFromArray 0, values_1

chart.AddSeries
chart.SetSeriesValuesFromArray 1, values_2

See Also

GetSeriesCount Method | SetSeriesValuesFromString Method | SetSeriesValuesFromArray Method | GetSeriesValue Method

Applies To: Chart Object