Skip to content

Latest commit

 

History

History
54 lines (22 loc) · 1 KB

3be6fc39-772e-89a9-fdcc-962b904ab694.md

File metadata and controls

54 lines (22 loc) · 1 KB

ChartGroup.VaryByCategories Property (PowerPoint)

True if Microsoft Word assigns a different color or pattern to each data marker. Read/write Boolean.

Syntax

expression. VaryByCategories

expression A variable that represents a ChartGroup object.

Remarks

The chart must contain only one series.

Example

Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example assigns a different color or pattern to each data marker in chart group one. You should run the example on a 2-D line chart that has data markers on a series.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).VaryByCategories = True

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members