[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IDataLabels.Count

Count Property

Count

Gets the number of IDataLabel objects in the collection.

This property returns the number of data labels for the current series. For a series without definable points, the collection can contain a single data label.

Declaration
int Count { get; }
ReadOnly Property Count As Integer
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, 300, 200);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, true);
ISeries series = shape.Chart.SeriesCollection[0];
series.HasDataLabels = true;
int count = series.DataLabels.Count;