Function Reference

_XLChart_3D_PositionSet

Set the 3D position of the chart.

#Include <ExcelChart.au3>
_XLChart_3D_PositionSet($oChart[, $iRotation = Default[, $iElevation = Default[, iPerspective = Default[, $iDepthPercent = Default[, $iHeightPercent = Default[, $iGapDepth = Default]]]]]])

 

Parameters

$oChart Chart object as returned by a preceding call to _XLChart_ChartCreate
$iRotation Optional: Rotation of the plot area around the z-axis, in degrees).
$iElevation Optional: Height at which you view the chart, in degrees.
$iPerspective Optional: Perspective for the 3-D chart view.
$iDepthPercent Optional: Depth of a 3-D chart as a percentage of the chart width.
$iHeightPercent Optional: Height of a 3-D chart as a percentage of the chart width.
$iGapDepth Optional: Distance between the data series in a 3-D chart as a percentage of the marker width.

 

Return Value

Success: Returns 1
Failure: Returns 0 and sets @error:
    1 - $oChart is no object
    2 - $iRotation is not a number or < 0 or > 360
    3 - $iElevation is not a number or < -90 or > 90
    4 - $iPerspective is not a number or < -1 or > 100
    5 - $iDepthPercent is not a number or < 20 or > 2000
    6 - $iHeightPercent is not a number or < 5 or > 500
    7 - $iGapDepth is not a number or < 0 or > 500
    8 - Error setting $iRotation. $oChart might not be 3D. See @extended for details
    9 - Error setting $iElevation. $oChart might not be 3D. See @extended for details
    10 - Error setting $iPerspective. $oChart might not be 3D. See @extended for details
    11 - Error setting $iDepthPercent. $oChart might not be 3D. See @extended for details
    12 - Error setting $iHeightPercent. $oChart might not be 3D. See @extended for details
    13 - Error setting $iGapDepth. $oChart might not be 3D. See @extended for details

 

Remarks

None.

 

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, 3, -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
; Chart 1: Rotation: 18 degrees, Elevation: 26 degrees, Perspective: 20
; *****************************************************************************
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Rotation of 18 degrees, Elevation of 26 degrees, Perspective of 20")
_XLChart_3D_PositionSet($aExcel[1], 18 , 26, 20)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_3D_Position' on line " & @ScriptLineNumber)

; *****************************************************************************
; Example 2
; Chart 1: Depth 150%, Height 20%, Gap between data series to 15%
; *****************************************************************************
$iXLC_Debug = 2
MsgBox(64, "Excel Chart Example Script", "Now changing chart 1 ..." & @CRLF & "Depth 150%, Height 20%, Gap between data series to 15%")
_XLChart_3D_PositionSet($aExcel[1], Default, Default, Default, 150, 2000, 15)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " Extended " & @extended & " returned by function '_XLChart_3D_Position' on line " & @ScriptLineNumber)