DataLabels Interface

Definition

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.

public interface class DataLabels : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000208B3-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface DataLabels : System.Collections.IEnumerable
Public Interface DataLabels
Implements IEnumerable
Attributes
Implements

Remarks

Use the DataLabels(Object) method to return the DataLabels collection.

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

Properties

Application

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

AutoScaleFont

True if the text in the object changes font size when the object size changes. The default value is True. Read/write Object.

AutoText

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

Border

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

Count

Returns the number of objects in the collection. Read-only Integer.

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

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

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

Format

Returns the ChartFormat object. Read-only.

HorizontalAlignment

Returns or sets the horizontal alignment for the specified object. Read/write Object.

Interior

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

Name

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

NumberFormat

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

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

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

Orientation

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

Parent

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

Position

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

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

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

Shadow

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

ShowBubbleSize

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

ShowCategoryName

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

ShowLegendKey

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

ShowPercentage

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

ShowRange

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

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

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.

Type

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

VerticalAlignment

Returns or sets the vertical alignment of the specified object.

Methods

_Default(Object)

Reserved for internal use.

_Dummy10()

Reserved for internal use.

_Dummy13()

Reserved for internal use.

_Dummy16()

Reserved for internal use.

_Dummy17()

Reserved for internal use.

_Dummy9()

Reserved for internal use.

Delete()

Deletes the object.

GetEnumerator()
Item(Object)

Returns a single object from the collection.

Propagate(Object)

Enables you to take the contents and formatting of a single data label and apply it to every other data label on the series.

Select()

Selects the object.

Applies to