DataLabels Method

Microsoft Graph Visual Basic

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