DataLabels Collection Object

DataLabels
Multiple objects

A collection of all the DataLabel objects for the specified series. Each DataLabel object represents a data label for a point or trendline. For a series without definable points (such as an area series), the DataLabels collection contains a single data label.

Using the DataLabels Collection

Use the DataLabels method to return the DataLabels collection. The following example sets the number format for data labels in series one in the chart.

With myChart.SeriesCollection(1)
    .HasDataLabels = True
    .DataLabels.NumberFormat = "##.##"
End With

Use DataLabels(index), where index is the data label's index number, to return a single DataLabel object. The following example sets the number format for the fifth data label in series one in the chart.

myChart.SeriesCollection(1).DataLabels(5).NumberFormat = "0.000"

Properties | Application Property | AutoScaleFont Property | AutoText Property | Border Property | Count Property | Creator Property | Fill Property | Font Property | HorizontalAlignment Property | Interior Property | Name Property | NumberFormat Property | NumberFormatLocal Property | Orientation Property | Parent Property | Position Property | ReadingOrder Property | Separator Property | Shadow Property | ShowBubbleSize Property | ShowCategoryName Property | ShowLegendKey Property | ShowPercentage Property | ShowSeriesName Property | ShowValue Property | Type Property | VerticalAlignment Property

Methods | Delete Method | Item Method

Parent Objects

Child Objects | Border Object | ChartFillFormat Object | Font Object | Interior Object