Edit

Share via


BarGroups method (Excel Graph)

On a 2D chart, this method returns an object that represents either a single bar chart group or a collection of all the bar chart groups.

Syntax

expression.BarGroups (Index)

expression Required. An expression that returns one of the objects in the ChartGroups collection.

Parameters

Name Required/Optional Data type Description
Index Optional Variant The index number of the specified bar chart group.

Example

This example sets the space between bar clusters in the 2D bar chart group to be 50 percent of the bar width.

myChart.BarGroups(1).GapWidth = 50

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.