Axis 对象(Word)Axis object (Word)

代表图表中的单个坐标轴。Represents a single axis in a chart.

备注Remarks

Axis 对象是 集合的一个成员。The Axis object is a member of the Axes collection.

使用类型AxisGroup ),其中_type_为坐标轴类型, _AxisGroup_是要返回单个axis对象的轴组。Use Axes ( Type , AxisGroup ) where Type is the axis type and AxisGroup is the axis group to return a single Axis object. _Type_可以是下列**XlAxisType** 常量之一: xlCategoryxlSeriesxlValueType can be one of the following XlAxisType constants: xlCategory, xlSeries, or xlValue. _AxisGroup_可以是下列**XlAxisGroup** 常量之一: xlPrimaryxlSecondaryAxisGroup can be one of the following XlAxisGroup constants: xlPrimary or xlSecondary. 有关详细信息,请参阅此 方法。For more information, see the Axes method.

示例Example

以下示例为活动文档中的第一个图表设置分类轴标题文本。The following example sets the category axis title text for the first chart in the active document.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.Axes(xlCategory) 
 .HasTitle = True 
 .AxisTitle.Caption = "1994" 
 End With 
 End If 
End With

方法Methods

属性Properties

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.