DataLabel DataLabel DataLabel Interface

Definition

Represents the data label on a chart point or trendline.

public interface class DataLabel
[System.Runtime.InteropServices.Guid("000208B2-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface DataLabel
Public Interface DataLabel
Attributes

Remarks

On a series, the DataLabel object is a member of the DataLabels collection. The DataLabels collection contains a DataLabel object for each point. For a series without definable points (such as an area series), the DataLabels collection contains a single DataLabel object.

Use DataLabels(index), where index is the data-label index number, to return a single DataLabel object.

Use the DataLabel property to return the DataLabel object for a single point.

On a trendline, the DataLabel property returns the text shown with the trendline. This can be the equation, the R-squared value, or both (if both are showing).

Properties

_Height _Height _Height
_Width _Width _Width
Application Application Application

Returns an Application object that represents the Microsoft Excel application. Read-only.

AutoScaleFont AutoScaleFont AutoScaleFont

True if the text in the object changes font size when the object size changes. The default value is True.

AutoText AutoText AutoText

True if the object automatically generates appropriate text based on context. Read/write Boolean.

Border Border Border

Returns a Border object that represents the border of the object.

Caption Caption Caption

The data label text. Read/write String.

Characters[Object, Object] Characters[Object, Object] Characters[Object, Object]

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

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created. If the object was created in Microsoft Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C. Read-only XlCreator.

Fill Fill Fill

Returns a FillFormat object for a specified shape or a ChartFillFormat object for a specified chart that contains fill formatting properties for the shape or chart. Read-only.

Font Font Font

Returns a Font object that represents the font of the specified object.

Format Format Format

Returns the ChartFormat object. Read-only.

Formula Formula Formula

Gets or sets a value that represents the formula of the object using A1-style notation, in English.

FormulaLocal FormulaLocal FormulaLocal

Gets or sets a value that represents the formula of the object using A1-style notation, in the language of the user.

FormulaR1C1 FormulaR1C1 FormulaR1C1

Gets or sets a value that represents the formula of the object using R1C1-style notation, in English.

FormulaR1C1Local FormulaR1C1Local FormulaR1C1Local

Gets or sets a value that represents the formula of the object using R1C1-style notation, in the language of the user.

Height Height Height

Gets the height, in points, of the object.

HorizontalAlignment HorizontalAlignment HorizontalAlignment

Returns or sets the horizontal alignment for the specified object.

Interior Interior Interior

Returns an Interior object that represents the interior of the specified object.

Left Left Left

The distance, in points, from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart). Read/write Double.

Name Name Name

Returns the name of the object. Read-only String.

NumberFormat NumberFormat NumberFormat

Returns or sets the format code for the object. Read/write String.

NumberFormatLinked NumberFormatLinked 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). Read/write Boolean.

NumberFormatLocal NumberFormatLocal NumberFormatLocal

Returns or sets the format code for the object as a string in the language of the user. Read/write Object.

Orientation Orientation Orientation

The text orientation. Can be an integer value from –90 to 90 degrees.

Parent Parent Parent

Returns the parent object for the specified object. Read-only.

Position Position Position

Returns or sets the position of the data label. Read/write XlDataLabelPosition.

ReadingOrder ReadingOrder ReadingOrder

Returns or sets the reading order for the specified object. Can be one of the following constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext. Read/write Integer.

Separator Separator Separator

Sets or returns an Object representing the separator used for the data labels on a chart. Read/write.

Shadow Shadow Shadow

True if the object has a shadow. Read/write Boolean.

ShowBubbleSize ShowBubbleSize ShowBubbleSize

True to show the bubble size for the data labels on a chart. False to hide. Read/write Boolean.

ShowCategoryName ShowCategoryName ShowCategoryName

True to display the category name for the data labels on a chart. False to hide. Read/write Boolean.

ShowLegendKey ShowLegendKey ShowLegendKey

True if the data label legend key is visible. Read/write Boolean.

ShowPercentage ShowPercentage ShowPercentage

True to display the percentage value for the data labels on a chart. False to hide. Read/write Boolean.

ShowRange ShowRange ShowRange

Used to toggle the Range field if it exists on the data label range. Boolean (bool in C#) Read/Write

ShowSeriesName ShowSeriesName ShowSeriesName

Returns or sets a Boolean to indicate the series name display behavior for the data labels on a chart. True to show the series name. False to hide. Read/write.

ShowValue ShowValue ShowValue

Returns or sets a Boolean corresponding to a specified chart's data label values display behavior. True displays the values. False to hide. Read/write.

Text Text Text

Returns or sets the text for the specified object. Read-only String.

Top Top Top

The distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Type Type Type

Returns or sets the label type. Read/write Object.

VerticalAlignment VerticalAlignment VerticalAlignment

Returns or sets the vertical alignment of the specified object.

Width Width Width

Gets the width, in points, of the object.

Methods

Delete() Delete() Delete()

Deletes the object.

Select() Select() Select()

Selects the object.

Applies to