XYGroups Method

Applies To

Chart object.

Description

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

Syntax 1

expression.XYGroups(Index)

Syntax 2

expression.XYGroups

expression Required. An expression that returns a Chart object.

Index Optional Variant. Specifies the chart group.

Example

This example sets X-Y group (scatter group) one to use a different color for each data marker. The example should be run on a 2-D chart.

Charts("Chart1").XYGroups(1).VaryByCategories = True