Share via


ChartGroups Object (Word)

Represents one or more series plotted in a chart with the same format.

Version Information

Version Added: Word 2007

Remarks

A ChartGroups collection is a collection of all the ChartGroup objects in the specified chart. 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.

The following example displays the number of chart groups on the first chart of the active document. Use the ChartGroups property to return the ChartGroups collection.

MsgBox ActiveDocument.InlineShapes(1).Chart._ 
 ChartGroups.Count

The following example adds drop lines to chart group 1 on chart sheet 1. Use ChartGroups(index), where Index is the chart group index number, to return a single ChartGroup object.

ActiveDocument.InlineShapes(1).Chart._ 
 ChartGroups(1).HasDropLines = True

See Also

Concepts

ChartGroups Object Members

Word Object Model Reference