Skip to content
本页内容

HasTitle (属性)

如果坐标轴或图表有可见标题,则为 Truebool 类型,可读写。

说明

坐标轴标题由 AxisTitle 对象代表。

示例

python
#此示例为图表工作表 Chart1 中图表的分类坐标轴添加坐标轴标志
def test():
    axis = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes().Item(xlCategory)
    axis.HasTitle = True
    axis.AxisTitle.Text = "July Sales"
python
#此示例将工作表 Sheet1 中第一张图表的数值轴标题设置为不可见
def test():
    axis = Application.Sheets.Item("Sheet1").ChartObjects(1).Chart.Axes().Item(xlValue)
    axis.HasTitle = False