Set properties for the marker objects of line, scatter or radar charts.
#Include <ExcelChart.au3>
_XLChart_MarkerSet($oObject[, $iSize = Default[, $iStyle = Default[, $iForeColor = Default[, $iBackColor = Default[, $bThemeColor = False]]]]])
Parameters
$oObject | Object for which the fill properties should be set (...) |
$iSize | Optional: Size of the data-marker in points. Can be a value from 2 through 72 (default = Default) |
$iStyle | Optional: Marker style. Can be any of the xlMarkerStyle enumeration (default = Default) |
$iForeColor | Optional: Sets the foreground fill color (default = Default) You can set colors to an explicit red-green-blue value (e.g. 0xFF00FF) or to a color in the color scheme (negative numbers -1 to -56) |
$iBackColor | Optional: Sets the background fill color (default = Default) You can set colors to an explicit red-green-blue value (e.g. 0xFF00FF) or to a color in the color scheme (negative numbers -1 to -56) |
$bThemeColor | Optional: True specifies that $iForeColor and $iBackColor are interpreted as theme colors (default = False). If set to True $iForeColor and $iBackColor values have to be one of the MsoThemeColorIndex enumeration |
Return Value
Success: Returns 1
Remarks
Color 0 (white) has to be specified as RGB value or use color 2 which has the same RGB value of 0xFFFFFF
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 1
; Set size
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set size")
_XLChart_MarkerSet($aExcel[1].SeriesCollection(1), 14)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_MarkerSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 2
; Set style
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set style")
_XLChart_MarkerSet($aExcel[1].SeriesCollection(1), Default, $xlMarkerStyleTriangle)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_MarkerSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 3
; Set foreground color
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set foreground color")
_XLChart_MarkerSet($aExcel[1].SeriesCollection(1), Default, Default, 0xFF8080)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_MarkerSet' on line " & @ScriptLineNumber)
; *****************************************************************************
; Example 4
; Set background color
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Set background color")
_XLChart_MarkerSet($aExcel[1].SeriesCollection(1), Default, Default, Default, -14)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_MarkerSet' on line " & @ScriptLineNumber)