DoughnutGroups Method

Chart.DoughnutGroups Method

On a 2-D chart, returns an object that represents either a single doughnut chart group (a ChartGroup object) or a collection of the doughnut chart groups (a ChartGroups collection).

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Object DoughnutGroups(
	Object Index


Type: System.Object

Specifies the chart group.

Return Value

Type: System.Object

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example creates a doughnut Chart and then uses the DoughnutGroups method to set the hole size of the chart.

private void UseDoughnutGroups()
    this.Range["A1", "A5"].Value2 = 22;
    this.Range["B1", "B5"].Value2 = 55;

    Microsoft.Office.Tools.Excel.Chart chart1 =
        this.Controls.AddChart(this.Range["D2", "H12"], 

    chart1.SetSourceData(this.Range["A1", "B5"], 
    chart1.ChartType = Excel.XlChartType.xlDoughnut;

    Excel.ChartGroup group =

    group.DoughnutHoleSize = 80;

© 2016 Microsoft