DataLabels Method
Applies To
Series object.
Description
Returns an object that represents either a single data label (a DataLabel object, Syntax 1) or a collection of all the data labels for the series (a DataLabels collection, Syntax 2).
Syntax 1
expression.DataLabels(Index)
Syntax 2
expression.DataLabels
expression Required. An expression that returns a Series object.
Index Optional Variant. The number of the data label.
See Also
DataLabel property.
Example
This example sets the data labels for series one to show their key, assuming that their values are visible when the example runs.
With myChart.SeriesCollection(1)
.HasDataLabels = True
With .DataLabels
.ShowLegendKey = True
.Type = xlValue
End With
End With