ChartGroup Object

Microsoft Graph Visual Basic

ChartGroupsChartGroup
Multiple objects

Represents one or more series of points 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, which contains all the series plotted with the line chart format, and a bar chart group, which contains all the series plotted with the bar chart format. The ChartGroup object is a member of the ChartGroups collection.

Using the ChartGroup Object

Use ChartGroups(index), where index is the chart group's index number, to return a single ChartGroup object. The following example adds drop lines to chart group one in the chart.

myChart.ChartGroups(1).HasDropLines = True
		

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 shortcut methods for chart groups 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 all the line chart groups, and so on. You can use each of these methods with an index number to return a single ChartGroup object, or you can use each one without an index number to return a ChartGroups collection. The following methods are available for chart groups: