Chart Interface
Represents a chart in a document.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
<GuidAttribute("92D41A55-F07E-4CA4-AF6F-BEF486AA4E6F")> _
Public Interface Chart
'Usage
Dim instance As Chart
[GuidAttribute("92D41A55-F07E-4CA4-AF6F-BEF486AA4E6F")]
public interface Chart
Remarks
The following properties and methods for returning a Chart object are described in the example section:
Chart property
AddChart method
Examples
The [InlineShapes#SameCHM] collection contains an object for each inline shape, including charts, in a document. Use InlineShapes(Index), where Index is the index number of an inline shape, to return a single InlineShape object. Use the [HasChart#SameCHM] property to determine if the InlineShape object represents a chart. If the HasChart property is set to True, use the [Chart#SameCHM] property to return a Chart object.
You can also use the [Type#SameCHM] property to determine if the InlineShape object represents a chart. If the Type property is set to WdInlineShapeChart, the inline shape represents a chart.
The following example checks if the first inline shape in the active document represents a chart. If so, the example changes the fore color of the first series on the chart.
With ActivePresentation.Slides(1).Shapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).Format.Fill.ForeColor.RGB = rgbRed
End If
End With