| Axis Methods and Properties |
| AxisCrossesMidCategory |
Valid only for the category axis. Determines whether category major gridlines
will be between categories, or in the middle of categories. By default, AxisCrossesMidCategory is set to True and category
major gridlines are between categories.
The following will display category major gridlines in the middle of a category.
Chart.CategoryAxis.AxisCrossesMidCategory = False
Top |
| AxisLine |
Returns a Line object, representing the appearance of an Axis.
The properties of AxisLine are LineColor, LineFormatting,
LineStyle, and LineWeight.
The following demonstrates setting the color of a category axis to blue.
CategoryAxis.AxisLine.LineColor = rgb(0,0,255)
Top |
| CategoryAxisCrossMaxValue |
Property of the ValueAxis.
When set to True, the category axis will cross the value axis at its maximum
value. CategoryAxisCrossMaxValue is False by default.
The following sets CategoryAxisCrossMaxValue to True.
ValueAxis.CategoryAxisCrossMaxValue = True
Top |
| CategoryCrossingValue |
Property of the ValueAxis. Sets or
retreives the Y value at which the category axis crosses the value axis. CategoryCrossingValue is 0 by default.
The following sets the Y value at which the category axis crosses the value axis to 5.
ValueAxis.CategoryCrossingValue = 5
Top |
| LabelFont |
Sets or returns a Font object, representing the label font for the
specified axis.
The following will set the LabelFont of the value axis to Tahoma.
chart.valueaxis.labelfont.name = "Tahoma"
Top |
| LabelPosition |
Sets or returns the position of axis labels. The values of LabelPosition are,
| Invisible Label | 0 |
| Low End Of PlotArea | 1 |
| High End Of PlotArea | 2 |
| Next To Axis | 3 |
The following will set LabelPosition to Invisible Label.
chart.valueaxis.labelposition = 0
Top |
| LogarithmicScale |
Property of the ValueAxis. When set to True,
LogarithmicScale will,
The following will produce a logarithmic chart.
ValueAxis.LogarithmicScale = True
Top |
| MajorGridline |
Returns a Line object, representing the major gridlines of
an axis. The properties of MajorGridline are LineColor,
LineFormatting, LineStyle,
and LineWeight.
The following sets the weight of the major gridlines on the Y axis to WideLine
(see LineWeight).
ValueAxis.MajorGridline.LineWeight = 3
Top |
| MajorIncrement |
Sets or returns the major unit of measurement of an axis, that is, the gap between its major
gridlines and/or major ticks marks.
The following sets the major unit of the Y axis to 4.
ValueAxis.MajorIncrement = 4
Top |
| MajorTickType |
Determines the display of axis tick marks on the major gridlines. Tick marks are
marks of measurement on an axis. The values of MajorTickType are,
| Invisible Tick | 0 |
| Inside Line Tick | 1 |
| Outside Line Tick | 2 |
| Cross Axis Line Tick | 3 |
The following will display major gridline tick marks inside the value axis.
chart.valueaxis.majorticktype = 1
Top |
| MaxValue |
Sets or returns the maximum value on the value axis. Note: MaxValue is a property of
ValueAxis, and not of CategoryAxis or ZAxis.
The following sets the maximum value on the value axis to 12.
chart.valueaxis.maxvalue = 12
Top |
| MinorGridline |
Returns a Line object, representing the minor gridlines of
an axis. The properties of MinorGridline are LineColor,
LineFormatting, LineStyle,
and LineWeight.
The following sets the style of the minor gridlines on the Y axis to Dash-Dot-Dot
(see LineStyle).
ValueAxis.MinorGridline.LineStyle = 4
Top |
| MinorIncrement |
Sets or returns the minor unit of measurement of an axis, that is, the gap between its minor
gridlines and/or minor ticks marks.
The following sets the minor unit of the Y axis to 1.
ValueAxis.MinorIncrement = 1
Top |
| MinorTickType |
Determines the display of axis tick marks on the minor gridlines. Tick marks are
marks of measurement on an axis. The values of MinorTickType are,
| Invisible Tick | 0 |
| Inside Line Tick | 1 |
| Outside Line Tick | 2 |
| Cross Axis Line Tick | 3 |
The following will display minor gridline tick marks outside the value axis.
chart.valueaxis.minorticktype = 2
Top |
| MinValue |
Sets or returns the minimum value on the value axis. Note: MinValue is a property of
ValueAxis, and not of CategoryAxis or ZAxis.
The following sets the minimum value on the value axis to 2.
chart.valueaxis.minvalue = 2
Top |
| Number |
Sets the display format of axis values.
For a complete list of Number codes, see Formatting Codes.
The following will display a chart's Y values as percentages.
Top |
| TextRotationAngle* |
Sets or returns the rotation angle of
axis values. Set TextRotationAngle to a value between -90 and 90. Negative
values rotate text clockwise, and positive values rotate text counterclockwise.
Example:
Set Chart = Charts.Add(0,3,3,0,15,7)
Chart.CategoryAxis.TextRotationAngle = 45
Top |
| Title |
Returns a ChartFrame object, representing the axis title.
The properties of Title are,
Area,
Border,
HasShadow,
Height,
Text,
TextFont,
TextHorizontalAlignment,
TextRotationAngle,
TextVerticalAlignment,
Width,
X, and
Y.
The following will display the title "Value Axis" next to the value axis.
chart.valueaxis.title = "Value Axis"
Top |
| ValuesInReverseOrder |
When set to True, displays axis values in reverse order.
The following will display Y values in reverse order, that is, the highest Y value will be at the chart's
origin.
ValueAxis.ValuesInReverseOrder = True
Top |
| Wall3D |
Returns an Area
object representing the walls or floor of a three-dimensional chart.
| CategoryAxis.Wall3D | Returns the walls of a 3-D chart |
| ValueAxis.Wall3D | Returns the floor of a 3-D chart |
The properties of Wall3D are AreaFormatting,
BackgroundColor, ForegroundColor,
and Pattern.
The following sets the color of the walls of a 3-D chart to red.
CategoryAxis.Wall3D.ForegroundColor = rgb(255,0,0)
Top |
| Wall3DBorder |
Returns a Line object representing the borders of a
3-D chart's walls or floor.
| CategoryAxis.Wall3DBorder | Returns the borders of a 3-D chart's walls |
| ValueAxis.Wall3DBorder | Returns the borders of a 3-D chart's floor |
The properties of Wall3DBorder are LineColor,
LineFormatting, LineStyle, and
LineWeight.
The following sets the color of a chart's wall borders to blue.
CategoryAxis.Wall3DBorder.LineColor = rgb(0,0,255)
Top |