Function Reference

_XLChart_AreaGroupSet

Set properties of an area chart group.

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

 

Parameters

$oObject Chart group for which the properties should be set
$bHasDropLines Optional: True if the area chart has drop lines (default = Default)

 

Return Value

Success: Returns 1
Failure: Returns 0 and sets @error:
    1 - $oObject is not an object
    2 - $bHasDropLines is not boolean

 

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.

You can either pass an item of the ChartGroups collection or an item of the AreaGroups collection (a ChartGroup object)

 

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 area chart
_XLChart_ChartSet($aExcel[1], $xlArea)
If @error <> 0 Then Exit MsgBox(16, "Excel Chart Example Script", "Error " & @error & " returned by _XLChart_Example on line " & @ScriptLineNumber)

; *****************************************************************************
; Example 1A
; Set drop lines for chart 1
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set drop lines")
_XLChart_AreaGroupSet($aExcel[1].AreaGroups(1), True)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_AreaGroupSet' on line " & @ScriptLineNumber)

; *****************************************************************************
; Example 1B
; Set drop lines color, style and weight
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set drop lines color, style and weight")
_XLChart_LineSet($aExcel[1].AreaGroups(1).DropLines, $xlMedium, -3, False, $xlThin)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineSet' on line " & @ScriptLineNumber)