Set properties of a doughnut chart group.
#Include <ExcelChart.au3>
_XLChart_DoughnutGroupSet($oObject[, $iFirstSliceAngle = Default[, $iDoughnutHoleSize = Default]])
Parameters
$oObject | Chart group for which the properties should be set |
$iFirstSliceAngle | Optional: Angle of the first doughnut slice in degrees (clockwise from vertical). Can be a value from 0 through 360 (default = Default) |
$iDoughnutHoleSize | Optional: Size of the hole in a doughnut chart group expressed as a percentage of the chart size, between 10 and 90 percent (default = Default) |
Return Value
Success: Returns 1
Remarks
A chart contains one or more chart groups, each chart group contains one or more series, and
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, 0, -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)
; Change chart 1 to an doughnut chart
_XLChart_ChartSet($aExcel[1], $xlDoughnut)
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
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set the angle of the first slice to 45 degrees")
_XLChart_DoughnutGroupSet($aExcel[1].DoughnutGroups(1), 45)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_DoughnutGroupSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 2
; Set the size of the hole to 10% of the chart size
; As the chart has only one chart group you can use ChartGroups or
; DoughnutGroups.
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set the size of the hole to 10% of the chart size")
_XLChart_DoughnutGroupSet($aExcel[1].ChartGroups(1), Default, 10)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_DoughnutGroupSet' on line " & @ScriptLineNumber)