Share via


DataLabels Method

Returns an object that represents either a single data label or a collection of all the data labels for the series.

expression.DataLabels(Index)

*expression   * Required. An expression that returns one of the objects in the Applies To list.

Index    Optional Variant. The number of the data label.

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

Applies to | Series Object

See Also | DataLabel Property