Class DataLabels (Word VBA)

A collection of all the DataLabel objects for the specified series.

Class Series gives access to class DataLabels.


Dim dls as DataLabels
Set dls = ActiveDocument.Background.Chart.FullSeriesCollection(1).DataLabels()

For Each

Here is an example of processing the DataLabels items in a collection.


Dim dtl As DataLabel
For Each dtl In ActiveDocument.Background.Chart.FullSeriesCollection.DataLabels()
	
Next dtl

Methods

Delete - Deletes the object.

Item - Returns a single DataLabel object from the collection.

Propagate - Propagates the contents and formatting of the specified data label to all the other data labels in the series.

Select - Selects the object.

Properties

AutoText true if all objects in the collection automatically generate appropriate text based on context.

Count returns the number of objects in the collection.

Format returns the line, fill, and effect formatting for the object.

HorizontalAlignment returns or sets the horizontal alignment for the specified object.

Name returns the name of the object.

NumberFormat returns or sets the format code for the object.

NumberFormatLinked true if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).

NumberFormatLocal returns or sets the format code for the object as a string in the language of the user.

Orientation returns or sets the text orientation. Read/write Long.

Position returns or sets the position of the data labels.

ReadingOrder returns or sets an XlReadingOrder constant that represents the reading order for the specified object.

Separator sets or returns the separator for the data labels on a chart. Read/write Variant.

Shadow returns or sets a value that indicates whether the object has a shadow.

ShowBubbleSize true to show the bubble size for the data labels on a chart. False to hide the bubble size.

ShowCategoryName true to display the category name for the data labels on a chart. False to hide the name.

ShowLegendKey true if the data label legend key is visible.

ShowPercentage true to display the percentage value for the data labels on a chart. False to hide the value.

ShowRange set to True to display the Value From Cells range field in all the chart data labels for a specified chart. Set to False to hide that field.

ShowSeriesName true to show the series name for the data labels on a chart. False to hide the name.

ShowValue true to display the data label values for a specified chart. False to hide the values.

VerticalAlignment returns or sets the vertical alignment of the specified object.