Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 1.72 KB

Project.chart.chartgroups.md

File metadata and controls

64 lines (39 loc) · 1.72 KB
title keywords f1_keywords ms.service ms.assetid ms.date ms.localizationpriority
Chart.ChartGroups property (Project)
vbapj.chm131625
vbapj.chm131625
project-server
49e50578-3b97-4bc5-6037-3d32f0f321a7
06/08/2017
medium

Chart.ChartGroups property (Project)

Gets an object that represents either a single chart group or a collection of chart groups, where a chart group represents one or more series of data points that are plotted with the same format. Read-only Object.

Syntax

expression. ChartGroups

expression A variable that represents a Chart object.

Remarks

A chart contains one or more chart groups, and each chart group contains one or more series of data points. For example, a single chart might contain both a line chart group, containing all the series plotted with the line chart format, and a bar chart group, containing all the series plotted with the bar chart format.

Example

The following example should be run on a simple line chart. The example toggles drop lines on and off for the chart.

Sub ToggleDropLines()
    Dim chartShape As Shape
    Dim chartGroup As Office.IMsoChartGroup
    Dim dropLines As Boolean
    Dim reportName As String
    
    reportName = "Simple line chart"
    Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
    
    Set chartGroup = chartShape.Chart.ChartGroups(1)
    dropLines = chartGroup.HasDropLines
    
    MsgBox "Chart group in " & reportName & ": " _
        & vbCrLf & "Drop lines: " & dropLines
        
    chartGroup.HasDropLines = Not dropLines
End Sub

Property value

OBJECT

See also

Chart Object

[!includeSupport and feedback]