[]
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.
ISeries this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISeries
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the series to retrieve. |
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];
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.
ISeries this[string name] { get; }
ReadOnly Default Property Item(name As String) As ISeries
| Type | Name | Description |
|---|---|---|
| string | name | The name of the series to retrieve. |
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"];