Class ChartGroup (Word 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 = ActiveDocument.Background.Chart.ChartGroups(Index:=1)

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

For Each

Here is an example of processing the ChartGroup items in a collection.

Dim chrg As ChartGroup
For Each chrg In ActiveDocument.Background.Chart.ChartGroups
	
Next chrg

Properties

AxisGroup returns the type of axis group.

ActiveDocument.Background.Chart.ChartGroups(1).AxisGroup = xlPrimary

BinsCountValue specifies the number of bins in the histogram chart.

ActiveDocument.Background.Chart.ChartGroups(1).BinsCountValue =

BinsOverflowEnabled specifies whether a bin for values above the BinsOverflowValue is enabled.

ActiveDocument.Background.Chart.ChartGroups(1).BinsOverflowEnabled = True

BinsOverflowValue if an BinsOverflowEnabled is True, specifies the value above which an overflow bin is displayed.

ActiveDocument.Background.Chart.ChartGroups(1).BinsOverflowValue =

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

ActiveDocument.Background.Chart.ChartGroups(1).BinsType = xlBinsTypeAutomatic

BinsUnderflowEnabled specifies whether a bin for values below the BinsUnderflowValue is enabled.

ActiveDocument.Background.Chart.ChartGroups(1).BinsUnderflowEnabled = True

BinsUnderflowValue if an BinsUnderflowEnabled is True, specifies the value below which an underflow bin is displayed.

ActiveDocument.Background.Chart.ChartGroups(1).BinsUnderflowValue =

BinWidthValue specifies the number of points in each range.

ActiveDocument.Background.Chart.ChartGroups(1).BinWidthValue =

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

ActiveDocument.Background.Chart.ChartGroups(1).BubbleScale =

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

ActiveDocument.Background.Chart.ChartGroups(1).DoughnutHoleSize =

DownBars returns the down bars on a line chart.

Dim dbsDownBars As DownBars
Set dbsDownBars = ActiveDocument.Background.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 = ActiveDocument.Background.Chart.ChartGroups(1).DropLines

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

ActiveDocument.Background.Chart.ChartGroups(1).FirstSliceAngle =

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.

ActiveDocument.Background.Chart.ChartGroups(1).GapWidth =

Has3DShading true if a chart group has three-dimensional shading.

ActiveDocument.Background.Chart.ChartGroups(1).Has3DShading = True

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

ActiveDocument.Background.Chart.ChartGroups(1).HasDropLines = True

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

ActiveDocument.Background.Chart.ChartGroups(1).HasHiLoLines = True

HasRadarAxisLabels true if a radar chart has axis labels.

ActiveDocument.Background.Chart.ChartGroups(1).HasRadarAxisLabels = 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.

ActiveDocument.Background.Chart.ChartGroups(1).HasSeriesLines = True

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

ActiveDocument.Background.Chart.ChartGroups(1).HasUpDownBars = True

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

Dim hllsHiLoLines As HiLoLines
Set hllsHiLoLines = ActiveDocument.Background.Chart.ChartGroups(1).HiLoLines

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

Dim lngIndex As Long
lngIndex = ActiveDocument.Background.Chart.ChartGroups(1).Index

Overlap specifies how bars and columns are positioned.

ActiveDocument.Background.Chart.ChartGroups(1).Overlap =

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

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.ChartGroups(1).Parent

RadarAxisLabels returns the radar axis labels for the specified chart group.

Dim tlsRadarAxisLabels As TickLabels
Set tlsRadarAxisLabels = ActiveDocument.Background.Chart.ChartGroups(1).RadarAxisLabels

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.

ActiveDocument.Background.Chart.ChartGroups(1).SecondPlotSize =

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 = ActiveDocument.Background.Chart.ChartGroups(1).SeriesLines

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

ActiveDocument.Background.Chart.ChartGroups(1).ShowNegativeBubbles = True

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

ActiveDocument.Background.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.

ActiveDocument.Background.Chart.ChartGroups(1).SplitType = xlSplitByCustomSplit

SplitValue returns or sets the threshold value separating the two sections of either a pie-of-pie chart or a bar-of-pie chart.

ActiveDocument.Background.Chart.ChartGroups(1).SplitValue =

UpBars returns the up bars on a line chart.

Dim ubsUpBars As UpBars
Set ubsUpBars = ActiveDocument.Background.Chart.ChartGroups(1).UpBars

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

ActiveDocument.Background.Chart.ChartGroups(1).VaryByCategories = True

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

Dim lngCount As Long
lngCount = ActiveDocument.Background.Chart.ChartGroups.Count

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

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.ChartGroups.Parent