Microsoft Office Tutorials and References
In Depth Information
21.6.5 Crosses and CrossesAt Properties
xlYears = 2
End Enum
Note that the value of this property takes effect only when the CategoryType property for the axis
is set to xlTimeScale , even though the value can be changed at any time.
21.6.5 Crosses and CrossesAt Properties
The Crosses property returns or sets the point on the specified axis at which the "other" axis
crosses—that is (we surmise), the other axis that is in the same axis group . Thus, if the specified
axis is a primary axis, so is the other axis. If the specified axis is a secondary axis, so is the other
axis. For instance, the code:
ActiveChart.Axes(xlValue, xlPrimary).Crosses = xlAxisCrossesMaximum
instructs the primary category axis (the other axis) to cross the primary value axis (the specified
axis) at the maximum point of the primary value axis (the specified axis).
The Crosses property can assume one of the following XlAxisCrosses constants:
Enum XlAxisCrosses
xlAxisCrossesCustom = -4114
xlAxisCrossesAutomatic = -4105
xlAxisCrossesMaximum = 2
xlAxisCrossesMinimum = 4
End Enum
When set to xlAxisCrossesAutomatic , Excel determines the crossing point. When set to
xlMinimum , the other axis crosses at the minimum value when the specified axis is a value axis
or the far-left category when the specified axis is a category axis. When set to xlMaximum , the
other axis crosses at the maximum value when the specified axis is a value axis or the far-right
category when the specified axis is a category axis. (Unfortunately, this property does not always
seem to act as advertised. In particular, I have noticed that setting this property to xlMinimum
does not always adjust the crossing point properly.)
Finally, the xlAxisCrossesCustom setting applies only to value axes, in which case when set
to xlAxisCrossesCustom , the CrossesAt property determines the crossing point for the other
(category) axis. Note that setting the CrossesAt property automatically sets the Crosses property to
xlAxisCrossesCustom .
For instance, referring to the CreateChart procedure, the code:
co.Chart.Axes(xlValue).CrossesAt = 50
causes the category axis to cross the value axis at 50.
Finally, note that these properties do not apply to 3-D charts.
21.6.6 Display Units
New to Excel 9 are the display unit-related properties HasDisplayUnitLabel, DisplayUnitLabel,
DisplayUnit, and DisplayUnitCustom, and the DisplayUnitLabel object. These properties can be
used to display a unit's legend for a chart axis. This is useful when dealing with labels that contain
very large numbers. For instance, if a series of labels has the form 1000000, 2000000, 3000000,
Search JabSto ::




Custom Search