Function Reference

_XLChart_PieGroupSet

Set properties of a pie or 3D-pie chart group.

#Include <ExcelChart.au3>
_XLChart_PieGroupSet($oObject[, $iFirstSliceAngle = Default])

 

Parameters

$oObject Chart group for which the properties should be set
$iFirstSliceAngle Optional: Angle of the first pie-chart slice in degrees (clockwise from vertical).
Can be a value from 0 through 360 (default = Default)

 

Return Value

Success: Returns 1
Failure: Returns 0 and sets @error:
    1 - $oObject is not an object
    2 - $iFirstSliceAngle is not an integer or < 0 or > 360

 

Remarks

A chart contains one or more chart groups, each chart group contains one or more series, and
each series contains one or more points.

or 2D-Pies you can either pass an item of the ChartGroups collection or an item of the PieGroups collection (a ChartGroup object).
or 3D-Pies you have to use an item of the ChartGroups collection.

 

Related

 

Example


#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y
#include-once
#include <ExcelChart.au3>

; *****************************************************************************
; Create example environment
; *****************************************************************************
Global $aExcel = _XLChart_Example(True, 7, -1, -1, -1)
If @error = 2 Then Exit MsgBox(16, "Excel Chart Example Script", "The installed Excel version is not supported by this UDF!" & @CRLF & "Version must be >= 12 (Excel 2007).")
If @error <> 0 Then Exit MsgBox(16, "Excel Chart Example Script", "Error " & @error & " returned by _XLChart_Example on line " & @ScriptLineNumber)

; *****************************************************************************
; Example 1
; Set the angle for the first slice to 45 degrees
; For 3D-Pies you have to use the ChartGroups collection
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set the angle of the first slice to 45 degrees")
_XLChart_PieGroupSet($aExcel[1].ChartGroups(1), 45)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_PieGroupSet' on line " & @ScriptLineNumber)