次の方法で共有


Chart.HasAxis Property (Excel)

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

Syntax

expression .HasAxis(Index1, Index2)

expression A variable that represents a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

Index1

Required

Variant

The axis type. Series axes apply only to 3-D charts. Can be one of the XlAxisType constants.

Index2

Optional

Variant

The axis group. 3-D charts have only one set of axes. Can be one of the XlAxisGroup constants.

Remarks

You must enter a value for at least one of the parameters when setting this property.

Microsoft Excel may create or delete axes if you change the chart type or the Axis.AxisGroup, Chart.AxisGroup, or Series.AxisGroup properties.

Example

This example turns on the primary value axis for Chart1.

Charts("Chart1").HasAxis(xlValue, xlPrimary) = True

See Also

Concepts

Chart Object Members

Chart Object