Skip to content
本页内容

Caption (属性)

返回或设置一个 str 值,它代表显示单位标志文本。

示例

python
#以下示例将 Chart1 上数值轴上显示标签的标题设置为“Millions”
def test():
    displayUnitLabel = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlValue).DisplayUnitLabel
    displayUnitLabel.Caption = "Millions"
python
#下例显示 Sheet1 上的第一个图表数值轴上单位标签的标题
def test():
    displayUnitLabel = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlValue).DisplayUnitLabel
    print(displayUnitLabel.Caption)