[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ILegendEntries.Count

Count Property

Count

Gets the number of legend entries in the collection.

Use this property to determine how many ILegendEntry objects are contained in the legend for a chart.

Declaration
int Count { get; }
ReadOnly Property Count As Integer
Examples
worksheet.Range["A1:B3"].Value = new object[,] {
    {"Name", "Value"},
    {"A", 10},
    {"B", 20}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B3"], RowCol.Columns, true, true);
int count = chart.Legend.LegendEntries.Count;