HasLegend 属性

       

如果图表有图例,则该值为 TrueBoolean 类型,可读写。

示例

本示例显示 Chart1 的图例,然后将图例的字体颜色设为蓝色。

With Charts("Chart1")
    .HasLegend = True
    .Legend.Font.ColorIndex = 5
End With