Skip to content
本页内容

Format (属性)

返回 ChartFormat 对象。只读。

示例

python
#本示例将图表工作表 Chart1 中数值轴上的单位标签背景色设置为绿色
def test():
    displayUnitLabel = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlValue).DisplayUnitLabel
    displayUnitLabel.Format.Fill.BackColor.RGB = RGB(0, 255, 0)
python
#下例将 Sheet1 上的第一个图表数值轴上的单位标签线条宽度设置为2
def test():
    displayUnitLabel = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlValue).DisplayUnitLabel
    displayUnitLabel.Format.Line.Weight = 2