Class DataLabel (PowerPoint VBA)

The class DataLabel represents the data label on a chart point or trendline.

The classes Point, Series and Trendline. give access to class DataLabel


Dim dtl as DataLabel
Set dtl = ActiveWindow.RangeFromPoint.Chart.FullSeriesCollection(1).DataLabels()

Methods

Delete - Deletes the object.

Select - Selects the object.

Properties

AutoText true if the object automatically generates appropriate text based on context.

Caption returns or sets the data label text.

Characters returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

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

Formula returns or sets the object's formula in A1-style notation.

FormulaLocal returns or sets the formula for the object, using A1-style references in the language of the user.

FormulaR1C1 returns or sets the formula for the object, using R1C1-style notation in the language of the macro.

FormulaR1C1Local returns or sets the formula for the object, using R1C1-style notation in the language of the user.

Height returns the height, in points, of the object.

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

Left returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area.

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 label.

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

Separator returns or sets the separator used 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 category 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 for the specified chart data label. 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 series name.

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

Text returns or sets the text for the specified object.

Top returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart).

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

Width returns the width, in points, of the object.

ChartCharacters - Represents characters in an object that contains text.

ChartFormat - Provides access to the OfficeArt formatting for chart elements.