SeriesCollection

SeriesCollection class

Encapsulates a collection of Series objects.

Properties

NameTypeDescription
CategoryDataStringGets or sets the range of category Axis values. It can be a range of cells (such as, “d1:e10”), or a sequence of values
SecondCategoryDataStringGets or sets the range of second category Axis values. It can be a range of cells (such as, “d1:e10”), or a sequence of
IsColorVariedbooleanRepresents if the color of points is varied.
Countint
Item (int)SeriesGets the Series element at the specified index.

Methods

NameDescription
getSeriesByOrderGets the Series element by order.
removeAtRemove at a series at the specific index.
changeSeriesOrderDirectly changes the orders of the two series.

NOTE: This method is now obsolete. Instead, please use SeriesCollection. | | swapSeries | Directly changes the orders of the two series. | | setSeriesNames | Sets the name of all the serieses in the chart.

If the start index is larger than the count of the serieses, it will re | | addR1C1 | Adds the Series collection to a chart.

If set data on contiguous cells, use colon to seperate them.For example, R[1]C[1 | | add | Adds the Series collection to a chart.

If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C | | clear | Clears the collection | | changeColors | | | iterator | | | get | Reserved for internal use. | | contains | Reserved for internal use. | | indexOf | Reserved for internal use. |

SeriesCollection.CategoryData property

Gets or sets the range of category Axis values. It can be a range of cells (such as, “d1:e10”), or a sequence of values (such as,"{2,6,8,10}").

Type: String

SeriesCollection.SecondCategoryData property

Gets or sets the range of second category Axis values. It can be a range of cells (such as, “d1:e10”), or a sequence of values (such as,"{2,6,8,10}"). Only effects when some ASerieses plot on the second axis.

Type: String

SeriesCollection.IsColorVaried property

Represents if the color of points is varied.

Type: boolean

SeriesCollection.Count property

Type: int

SeriesCollection.Item (int) property

Gets the Series element at the specified index.

Type: Series

getSeriesByOrder(order)

Gets the Series element by order.

ParameterTypeDescription
orderintThe order of series

Returns: The element series

removeAt(index)

Remove at a series at the specific index.

ParameterTypeDescription
indexintThe index.

changeSeriesOrder(sourceIndex, destIndex)

Directly changes the orders of the two series.

NOTE: This method is now obsolete. Instead, please use SeriesCollection.SwapSeries method. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
sourceIndexintThe current index
destIndexintThe dest index

swapSeries(sourceIndex, destIndex)

Directly changes the orders of the two series.

ParameterTypeDescription
sourceIndexintThe current index
destIndexintThe dest index

setSeriesNames(startIndex, area, isVertical)

Sets the name of all the serieses in the chart.

If the start index is larger than the count of the serieses, it will return and do nothing. If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5. If set data on contiguous cells, use comma to seperate them.For example, ($C$2,$D$5).

ParameterTypeDescription
startIndexintThe index of the first series which you want to set the name.
areaStringSpecifies the area for the series name.
isVerticalboolean>Specifies whether to plot the series from a range of cell values by row or by column.

addR1C1(area, isVertical)

Adds the Series collection to a chart.

If set data on contiguous cells, use colon to seperate them.For example, R[1]C[1]:R[3]C[2]. If set data on contiguous cells, use comma to seperate them.For example,(R[1]C[1],R[3]C[2]).

ParameterTypeDescription
areaStringSpecifies values from which to plot the data series
isVerticalbooleanSpecifies whether to plot the series from a range of cell values by row or by column.

Returns: Return the first index of the added ASeries in the NSeries.

add(dataArea, isVertical) (1 of 3)

Adds the Series collection to a chart.

If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5. If set data on non contiguous cells, use comma to seperate them.For example: ($C$2,$D$5).

ParameterTypeDescription
areaSpecifies values from which to plot the data series
isVerticalbooleanSpecifies whether to plot the series from a range of cell values by row or by column.

Returns: Return the first index of the added ASeries in the NSeries.


add(area, isVertical, checkLabels) (2 of 3)

Adds the Series collection to a chart.

If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5. If set data on non contiguous cells, use comma to seperate them.For example, ($C$2,$D$5).

ParameterTypeDescription
areaStringSpecifies values from which to plot the data series
isVerticalbooleanSpecifies whether to plot the series from a range of cell values by row or by column.
checkLabelsbooleanIndicates whether the range contains series’s name

Returns: Return the first index of the added ASeries in the NSeries.


add(value) (3 of 3)

Reserved for internal use.

clear()

Clears the collection

changeColors(type)

iterator()

get(index)

Reserved for internal use.

contains(value)

Reserved for internal use.

indexOf(value)

Reserved for internal use.