DataLabels 方法

       

返回代表单个数据标签或所有数据系列的数据标签集合的某个对象。

expression.DataLabels(Index)

expression   必需。该表达式返回“应用于”列表中的对象之一。

Index   Variant 类型,可选。数据标签的编号。

示例

本示例使第一个数据系列的数据标签显示其图例标示。本示例运行时,假定这些数据标签的数值可见。

With myChart.SeriesCollection(1)
    .HasDataLabels = True
    With .DataLabels
        .ShowLegendKey = True
        .Type = xlValue
    End With
End With