主题
Caption (属性)
返回或设置一个 str 值,它代表坐标轴标题文本。
示例
python
#本示例将工作表 Sheet1 中第一张图表的数值轴标题设置为“一年级成绩”
def test():
axes = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlValue)
axes.HasTitle = True
axistitle = axes.AxisTitle
axistitle.Caption = "一年级成绩"
python
#本示例显示图表工作表 Chart1 中图表的分类轴标题
def test():
axistitle = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlCategory).AxisTitle
print(axistitle.Caption)