[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ISeriesCollection.Item

this Property

this[int]

Gets the series at the specified index in the collection.

Use this property to access an individual chart series after series have been added to the chart.

Declaration
ISeries this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISeries
Parameters
Type Name Description
int index

The zero-based index of the series to retrieve.

Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Month", "Sales"},
    {"Jan", 10},
    {"Feb", 20},
    {"Mar", 15}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 360, 230);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B4"]);
ISeries series = shape.Chart.SeriesCollection[0];

this[string]

Gets the series with the specified name from this collection.

Use this indexer to retrieve a chart series by its name after series names have been assigned or inferred from the source data.

Declaration
ISeries this[string name] { get; }
ReadOnly Default Property Item(name As String) As ISeries
Parameters
Type Name Description
string name

The name of the series to retrieve. null is not supported.

Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Month", "Sales"},
    {"Jan", 10},
    {"Feb", 20},
    {"Mar", 15}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 360, 230);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B4"]);
ISeries series = shape.Chart.SeriesCollection[0];
series.Name = "Sales";
ISeries salesSeries = shape.Chart.SeriesCollection["Sales"];