Partager via


ChartGroups Interface

A collection of all the ChartGroup objects in the specified chart.

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

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("0002085A-0000-0000-C000-000000000046")> _
Public Interface ChartGroups _
    Inherits IEnumerable
'Usage
Dim instance As ChartGroups
[InterfaceTypeAttribute()]
[GuidAttribute("0002085A-0000-0000-C000-000000000046")]
public interface ChartGroups : IEnumerable

Remarks

Each ChartGroup object represents one or more series plotted in a chart with the same format. A chart contains one or more chart groups, each chart group contains one or more series, and each series contains one or more points. For example, a single chart might contain both a line chart group, containing all the series plotted with the line chart format, and a bar chart group, containing all the series plotted with the bar chart format.

Use the ChartGroups method to return the ChartGroups collection. Use ChartGroups(index), where index is the chart-group index number, to return a single ChartGroup object. If the chart has been activated, you can use ActiveChart.

Because the index number for a particular chart group can change if the chart format used for that group is changed, it may be easier to use one of the named chart group shortcut methods to return a particular chart group. The PieGroups method returns the collection of pie chart groups in a chart, the LineGroups method returns the collection of line chart groups, and so on. Each of these methods can be used with an index number to return a single ChartGroup object, or without an index number to return a ChartGroups collection. The following chart group methods are available:

See Also

Reference

ChartGroups Members

Microsoft.Office.Interop.Excel Namespace