BarGroups Method

Applies To

Chart object.

Description

On a 2-D chart, this method returns an object that represents either a single bar chart group (a ChartGroup object, Syntax 1) or a collection of all the bar chart groups (a ChartGroups collection, Syntax 2).

Syntax 1

expression.BarGroups(Index)

Syntax 2

expression.BarGroups

expression Required. An expression that returns a Chart object.

Index Optional Variant. The index number of the specified bar chart group.

See Also

AreaGroups method, Bar3DGroup property, ChartGroups method, ColumnGroups method, DoughnutGroups method, LineGroups method, PieGroups method.

Example

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

myChart.BarGroups(1).GapWidth = 50