AutoPieChart Object
The AutoPieChart object controls 2D pie chart settings.
Derived from: AutoShape object (All methods and properties of AutoShape apply to this object.)
Properties
Methods
Example
This example shows how to reference the pie chart.
Sub Main
'Declare the variable that references the application
Dim GrapherApp As Object
'Creates an instance of the Grapher Application object
'and assigns it to the variable named "GrapherApp"
Set GrapherApp = CreateObject("Grapher.Application")
'Make Grapher visible
GrapherApp.Visible = True
'Declare Docs as Object
Dim Docs As Object
'Assigns the Documents collection to
'the variable named "Docs"
Set Docs = GrapherApp.Documents
'Declares Plot as Object
Dim Plot As Object
'Creates a new plot window and assigns it to
'the variable named "Plot"
Set Plot = Docs.Add(grfPlotDoc)
'Declares Shapes as Object
Dim Shapes As Object
'Assigns the AutoShapes collection to
'the variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares Graph1 as Object
Dim Graph1 As Object
'Adds a pie chart and assigns it to
'the variable named "Graph1"
Set Graph1 = Shapes.AddPieChart(GrapherApp.Path + "\samples\pie.dat")
End Sub