Class Series (PowerPoint VBA)

The class Series represents a series in a chart.

The main procedures of class Series are Copy, Delete, Select and SeriesCollection.Add

Set

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

Dim srs as Series
Set srs = ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(Index:=1)

The following procedures can be used to set variables of type Series: Chart.FullSeriesCollection, FullSeriesCollection.Item, Points, SeriesCollection.Item, SeriesCollection.Add, SeriesCollection.NewSeries, Chart.SeriesCollection and ChartGroup.SeriesCollection

Themes

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

Data with its procedures ApplyDataLabels, DataLabels, HasDataLabels and ParentDataLabelOption
Format with its procedures ClearFormats, Format, InvertColor, InvertColorIndex, MarkerBackgroundColor, MarkerBackgroundColorIndex, MarkerForegroundColor, MarkerForegroundColorIndex, MarkerStyle and PlotColorIndex
Formula with its procedures Formula, FormulaLocal, FormulaR1C1 and FormulaR1C1Local
Picture with its procedures PictureType and PictureUnit2
Value with its procedures Values and XValues

Methods

These are the main methods of the Series class

Copy - If the series has a picture fill, copies the picture to the Clipboard.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Copy

Delete - Deletes the object.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Delete

Select - Selects the object.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Select

SeriesCollection.Add - Adds one or more new series to the collection.

Dim srs As Series
Set srs = ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SeriesCollection.Add(Source:=)

Other Methods

ErrorBar - Applies error bars to the series.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).ErrorBar Direction:=xlChartX, Include:=xlErrorBarIncludeBoth, Type:=xlErrorBarTypeCustom

SetProperty -

Dim strId As String: strId = 
ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).SetProperty Id:=strId, Value:=

SeriesCollection.Extend - Adds new data points to an existing series collection.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1).SeriesCollection.Extend Source:= "B1:B6"

Properties

FullSeriesCollection.Count returns a Long that represents the number of full series in the collection.

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

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

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

ApplyPictToEnd true if a picture is applied to the end of the point or all points in the series.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).ApplyPictToEnd = True

ApplyPictToFront true if a picture is applied to the front of the point or all points in the series.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).ApplyPictToFront = True

ApplyPictToSides true if a picture is applied to the sides of the point or all points in the series.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).ApplyPictToSides = True

AxisGroup returns the type of axis group.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).AxisGroup = xlPrimary

BarShape returns or sets the shape used for a single series in a 3D bar or column chart.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).BarShape = xlBox

BubbleSizes returns or sets a string that refers to the worksheet cells that contain the x-value, y-value, and size data for the bubble chart.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).BubbleSizes = 10

ChartType returns or sets the chart type.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).ChartType = xlColumnClustered

ErrorBars returns the error bars for the series.

Dim ebsErrorBars As ErrorBars
Set ebsErrorBars = ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).ErrorBars

Explosion returns or sets the explosion value for a pie-chart or doughnut-chart slice.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Explosion =

GeoMappingLevel

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).GeoMappingLevel = xlGeoMappingLevelAutomatic

GeoProjectionType

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).GeoProjectionType = xlGeoProjectionTypeAlbers

HasErrorBars true if the series has error bars.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).HasErrorBars = True

HasLeaderLines true if the series has leader lines.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).HasLeaderLines = True

InvertIfNegative true if Microsoft Word inverts the pattern in the object when it corresponds to a negative number.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).InvertIfNegative = True

IsFiltered returns or sets a Boolean that determines whether the specified chart series is filtered out from the chart.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).IsFiltered = True

LeaderLines returns the leader lines for the series.

Dim llsLeaderLines As LeaderLines
Set llsLeaderLines = ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).LeaderLines

MarkerSize returns or sets the data-marker size, in points.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).MarkerSize = 10

Name returns or sets the name of the object.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Name =

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

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

PlotOrder returns or sets the plot order for the selected series within the chart group.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).PlotOrder = 3

QuartileCalculationInclusiveMedian true if the series uses an inclusive median quartile calculation method.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).QuartileCalculationInclusiveMedian = True

RegionLabelOption

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).RegionLabelOption = xlRegionLabelOptionsBestFitOnly

SeriesColorGradientStyle

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).SeriesColorGradientStyle = xlSeriesColorGradientStyleDiverging

Shadow returns or sets a value that indicates whether the object has a shadow.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Shadow = True

Smooth true if curve smoothing is enabled for the line chart or scatter chart.

ActivePresentation.Slides(1).Shapes(1).Chart.FullSeriesCollection(1).Smooth = True

Type returns or sets the series type.

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).Type =

ValueSortOrder

ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).ValueSortOrder = xlValueAscending

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

Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).SeriesCollection.Count

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

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