Set properties of a line chart group.
#Include <ExcelChart.au3>
_XLChart_LineGroupSet($oObject[, $bHasUpDownBars = Default[, $bHasHiLoLines = Default[, $bHasDropLines = Default]]])
Parameters
$oObject | Chart group for which the properties should be set |
$bHasUpDownBars | Optional: True if the line chart has up and down bars (default = Default) |
$bHasHiLoLines | Optional: True if the line chart has high-low lines (default = Default) |
$bHasDropLines | Optional: True if the line chart has drop lines (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)
; *****************************************************************************
; Example 1A
; Set up and down bars for chart 1
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set up down bars")
_XLChart_LineGroupSet($aExcel[1].LineGroups(1), True)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineGroupSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 1B
; Set color, style and weight
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set color, style and weight")
_XLChart_LineSet($aExcel[1].LineGroups(1).DownBars, $xlMedium, 0xFF0000, False, $xlThin)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineSet' on line " & @ScriptLineNumber)
_XLChart_LineSet($aExcel[1].LineGroups(1).UpBars, $xlMedium, 0x00FF00, False, $xlThin)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 2A
; Set high-low lines for chart 1
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set high-low lines")
_XLChart_LineGroupSet($aExcel[1].LineGroups(1), False, True)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineGroupSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 2B
; Set color, style and weight
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set color, style and weight")
_XLChart_LineSet($aExcel[1].LineGroups(1).HiLoLines, $xlMedium, -3, False, $xlThin)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 3A
; Set drop lines for chart 1
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set drop lines")
_XLChart_LineGroupSet($aExcel[1].LineGroups(1), False, False, True)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineGroupSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 3B
; Set color, style and weight
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set color, style and weight")
_XLChart_LineSet($aExcel[1].LineGroups(1).DropLines, $xlMedium, -7, False, $xlThin)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_LineSet' on line " & @ScriptLineNumber)