XYGroups method (Excel Graph)

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

Syntax

expression.XYGroups (Index)

expression Required. An expression that returns one of the objects in the Applies To list.

Parameters

Name Required/Optional Data type Description
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 2D chart.

myChart.XYGroups(1).VaryByCategories = True

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.