Share via


HasAxis Property

Returns or sets which axes exist on the chart. Read/write Variant.

expression.HasAxis(Index1, Index2)

*expression   * Required. An expression that returns one of the objects in the Applies To list.

XlAxisType

XlAxisType can be one of these XlAxisType constants.
xlCategory
xlValue

xlSeriesAxis. Series axes apply only to 3-D charts.

XlAxisGroup

XlAxisGroup can be one of these XlAxisGroup constants.
xlPrimary
xlSecondary

3-D charts have only one set of axes.

Remarks

Microsoft Graph may create or delete axes if you change the chart type or change the AxisGroup property.

Example

This example turns on the primary value axis.

myChart.HasAxis(xlValue, xlPrimary) = True

Applies to | Chart Object

See Also | Axes Collection