DataLabel property (Excel Graph)

Returns a DataLabel object that represents the data label associated with the specified point or trendline. Read-only.

Syntax

expression.DataLabel

expression Required. An expression that returns a DataLabel object.

Example

This example turns on the data label for point seven in series three, and then it sets the data label color to blue.

With myChart.SeriesCollection(3).Points(7) 
 .HasDataLabel = True 
 .ApplyDataLabels type:=xlValue 
 .DataLabel.Font.ColorIndex = 5 
End With

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.