[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IDataLabels.Item

this Property

this[int]

Gets a single IDataLabel object from the collection by index.

Use this property to access an individual data label in the data labels collection for a series.

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

The zero-based index of the data label in the collection.

Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Month", "Sales"},
    {"Jan", 10},
    {"Feb", 15},
    {"Mar", 12}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"]);
ISeries series = chart.SeriesCollection[0];
series.HasDataLabels = true;
IDataLabel dataLabel = series.DataLabels[0];