[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IChartGroups.Count

Count Property

Count

Gets the number of chart groups in the collection.

The returned value indicates how many IChartGroup objects are contained in this IChartGroups collection for the chart.

Declaration
int Count { get; }
ReadOnly Property Count As Integer
Examples
worksheet.Range["A1:C4"].Value = new object[,] {
    {"Month", "Sales", "Target"},
    {"Jan", 100, 120},
    {"Feb", 140, 130},
    {"Mar", 160, 150}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["B1:C4"]);
chart.SeriesCollection[1].ChartType = ChartType.Line;
int count = chart.ChartGroups.Count;