Skip to content
本页内容

Format (属性)

返回 ChartFormat 对象。只读。

示例

python
#下例将 Sheet1 上的第一个图表的第三个图例项的图例标示前景填充色设置为绿色
def test():
    legend = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Legend
    legend.LegendEntries(3).LegendKey.Format.Fill.ForeColor.RGB = RGB(0, 255, 0)
python
#本示例设置图表工作表 Chart1 上第二个图例项的图例标示边框线条的粗细
def test():
    legend = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Legend
    legend.LegendEntries(2).LegendKey.Format.Line.Weight = 2