Crosses Property
ChartAxisCrossesEnum
ChartAxisCrossesEnum can be one of these ChartAxisCrossesEnum constants. |
chAxisCrossesAutomatic The crossing point for the two axes is set automatically. |
chAxisCrossesCustom The CrossesAtValue and CrossingAxis properties specify the crossing point. |
expression.Crosses
expression Required. An expression that returns a ChAxis object.
Example
This example sets the category axis to cross the value axis at value zero (0) in the chart workspace if a custom crossing point has not already been set for the category axis.
Sub Format_Axis()
Dim chConstants
Dim axValueAxis
Dim axCategoryAxis
Set chConstants = ChartSpace1.Constants
Set axValueAxis = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
Set axCategoryAxis = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
If axCategoryAxis.Crosses = chConstants.chAxisCrossesAutomatic Then
axValueAxis.CrossingAxis = axCategoryAxis
axCategoryAxis.CrossesAtValue = 0
End If
End Sub