Class ChartGroup (PowerPoint VBA)

The class ChartGroup represents one or more series plotted in a chart with the same format.

Set

To use a ChartGroup class variable it first needs to be instantiated, for example

Dim chrg as ChartGroup
Set chrg = ActiveWindow.RangeFromPoint.Chart.ChartGroups(Index:=1)

The following procedures can be used to set variables of type ChartGroup: ChartGroups.Item and Chart.ChartGroups

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Axis with its procedures AxisGroup, HasRadarAxisLabels and RadarAxisLabels
Value with its procedures BinsCountValue, BinsOverflowValue, BinsUnderflowValue, BinWidthValue and SplitValue
Enable with its procedures BinsOverflowEnabled and BinsUnderflowEnabled

Properties

BinsType specifies how the horizontal axis of the histogram chart is formatted, by bins type.

ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).BinsType = xlBinsTypeAutomatic

BubbleScale returns or sets the scale factor for bubbles in the specified chart group.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).BubbleScale = 200

DoughnutHoleSize returns or sets the size of the hole in a doughnut chart group.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).DoughnutHoleSize = 10

DownBars returns the down bars on a line chart.

Dim dbsDownBars As DownBars
Set dbsDownBars = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).DownBars

DropLines returns the drop lines for a series on a line chart or area chart.

Dim dlsDropLines As DropLines
Set dlsDropLines = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).DropLines

FirstSliceAngle returns or sets the angle, in degrees (clockwise from vertical), of the first pie-chart or doughnut-chart slice.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).FirstSliceAngle = 12

GapWidth for bar and column charts, returns or sets the space, as a percentage of the bar or column width, between bar or column clusters. For pie-of-pie and bar-of-pie charts, returns or sets the space between the primary and secondary sections of the chart.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).GapWidth = 30

HasDropLines true if the line chart or area chart has drop lines.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).HasDropLines = True

HasHiLoLines true if the line chart has high-low lines.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).HasHiLoLines = True

HasSeriesLines true if a stacked column chart or bar chart has series lines or if a pie-of-pie chart or bar-of-pie chart has connector lines between the two sections.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).HasSeriesLines = True

HasUpDownBars true if a line chart has up and down bars.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).HasUpDownBars = True

HiLoLines returns the high-low lines for a series on a line chart.

Dim hllsHiLoLines As HiLoLines
Set hllsHiLoLines = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).HiLoLines

Index returns the index number of the object within the collection of similar objects.

Dim lngIndex As Long
lngIndex = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).Index

Overlap specifies how bars and columns are positioned.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).Overlap = -50

Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).Parent

SecondPlotSize returns or sets the size, as a percentage of the primary pie, of the secondary section of either a pie-of-pie chart or a bar-of-pie chart.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SecondPlotSize = 50

SeriesLines returns the series lines for a 2D stacked bar, 2D stacked column, pie-of-pie, or bar-of-pie chart.

Dim slsSeriesLines As SeriesLines
Set slsSeriesLines = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SeriesLines

ShowNegativeBubbles true if negative bubbles are shown for the chart group.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).ShowNegativeBubbles = True

SizeRepresents returns or sets what the bubble size represents on a bubble chart.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SizeRepresents = xlSizeIsArea

SplitType returns or sets the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SplitType = xlSplitByCustomSplit

UpBars returns the up bars on a line chart.

Dim ubsUpBars As UpBars
Set ubsUpBars = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).UpBars

VaryByCategories true if Microsoft Word assigns a different color or pattern to each data marker.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).VaryByCategories = True

ChartGroups.Count returns the number of objects in the collection.

Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.Chart.ChartGroups.Count

ChartGroups.Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveWindow.RangeFromPoint.Chart.ChartGroups.Parent