Skip to content
本页内容

Format (属性)

返回 ChartFormat 对象。只读。

示例

python
#本示例将图表工作表 Chart1 中图表的分类轴标题的边框设置为虚线
def test():
    axistitle = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlCategory).AxisTitle
    axistitle.Format.Line.DashStyle = msoLineDashDotDot
python
#本示例将工作表 Sheet1 中第一张图表的数值轴标题的前景色设置为蓝色
def test():
    axistitle = Application.Sheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlValue).AxisTitle
    axistitle.Format.Fill.ForeColor.RGB = RGB(0, 255, 255)