The 3DProperties object represents the set of properties specific to three-dimensional charts.
| 3DProperties Methods and Properties |
| ChartDepth |
Sets or retrieves the depth of a three-dimensional chart. The default value of
ChartDepth is 100.
The following example demonstrates setting ChartDepth to 200.
set 3DProperties = chart.view3d
3DProperties.ChartDepth = 200
Top |
| DistanceFromEyeToChart |
Sets or retrieves a perspective value, from 0 to 100 degrees, that
represents the ratio of the chart's front to its back. The perspective value determines the appearance of chart depth.
The default value of DistanceFromEyeToChart is 30.
Setting DistanceFromEyeToChart will have no effect unless you enable
UsePerspectiveTransform.
The following example demonstrates setting DistanceFromEyeToChart to 80 degrees.
set 3DProperties = chart.view3d
3DProperties.UsePerspectiveTransform = true
3DProperties.DistanceFromEyeToChart = 80
Top |
| ElevationAngle |
Sets or retrieves the elevation angle of a chart. By default, ElevationAngle
is set to 15, that is, the chart is elevated 15 degrees.
The following example demonstrates setting the elevation angle of a chart to 45 degrees.
set 3DProperties = chart.view3d
3DProperties.elevationangle = 45
Top |
| PlotVolumeHeight |
Sets or retrieves the height of a 3D chart, as a percentage of the chart's base
length. By default, PlotVolumeHeight is 100, that is, 100% of the base length, or equal to the base length.
Setting PlotVolumeHeight will have no effect unless you disable UseAutoScaling.
The following example demonstrates setting the chart height to 50% of the base length.
set 3DProperties = chart.view3d
3DProperties.UseAutoScaling = 0 '--- Disables UseAutoScaling
3DProperties.PlotVolumeHeight = 50
Top |
| RotationAngle |
Sets or retrieves the rotation angle of a three-dimensional chart. By default,
RotationAngle is set to 20, that is, the chart is rotated 20 degrees.
The following example demonstrates setting the rotation angle of a chart to 60 degrees.
set 3DProperties = chart.view3d
3DProperties.rotationangle = 60
Top |
| SeriesGapDepth |
Sets or retrieves the gap width between categories of series values.
SeriesGapDepth values range from 0 to 500. The greater the value of SeriesGapDepth, the wider the
gap. SeriesGapDepth is set to 150 by default.
The following example demonstrates setting SeriesGapDepth to 200.
set 3DProperties = chart.view3d
3DProperties.SeriesGapDepth = 200
Top |
| Show3D |
When set to True, displays chart with three-dimensional effect. When set to False,
displays two dimensions, even if the chart has a 3-D subtype. Show3D is set to True by default.
The following example demonstrates disabling Show3D.
set 3DProperties = chart.view3d
3DProperties.Show3D = False
Top |
| Stack3DColumns |
When set to False, displays series categories from front to back of the chart,
with a gap between the columns. When set to True, displays columns side by side.
To set Stack3DColumns to True, use
3DProperties.Stack3DColumns = true
Top |
| UseAutoScaling |
When UseAutoScaling is enabled, Microsoft Excel will automatically scale
a three-dimensional chart to be close to the size of its two-dimensional version. UseAutoScaling is set to 1, that is,
enabled, by default. Disable UseAutoScaling to use PlotVolumeHeight.
The following example demonstrates disabling UseAutoScaling.
set 3DProperties = chart.view3d
3DProperties.UseAutoScaling = 0
Top |
| UsePerspectiveTransform |
When enabled, allows you to control the appearance of chart depth, by
setting the value of DistanceFromEyeToChart. UsePerspectiveTransform is
disabled by default. When UsePerspectiveTransform is disabled, the chart's axes will be displayed at right angles,
regardless of rotation and elevation values.
The following example demonstrates enabling UsePerspectiveTransform.
set 3DProperties = chart.view3d
3DProperties.UsePerspectiveTransform = true
Top |
| ZAxis |
Returns an Axis object, representing a three-dimensional chart's z-axis. The properties of
ZAxis are,
AxisLine,
LabelFont,
LabelPosition,
MajorGridline,
MajorIncrement,
MajorTickType,
MinorGridline,
MinorIncrement,
MinorTickType,
Number,
Title, and
ValuesInReverseOrder.
The following example demonstrates setting a title for the z-axis.
chart.view3d.zaxis.title = "Z Axis"
Top |