主题
LegendKey (属性)
返回一个 LegendKey 对象,该对象表示与图例项相关的图例标示。
示例
python
#本示例显示 Chart1 上图例项一的图例标示的宽度
def test():
print(Application.Charts.Item("Chart1").ChartObjects(1).Chart.Legend.LegendEntries(1).LegendKey.Width)
python
#下例显示 Sheet1 中的第一个图表的第二个图例项的图例标示的高度
def test():
legend = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Legend
print(legend.LegendEntries(2).LegendKey.Height)