Edytuj

Udostępnij za pośrednictwem


DataLabels Interface

Definition

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

public interface class DataLabels : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("D8252C5E-EB9F-4D74-AA72-C178B128FAC4")]
public interface DataLabels : System.Collections.IEnumerable
type DataLabels = interface
    interface IEnumerable
Public Interface DataLabels
Implements IEnumerable
Attributes
Implements

Examples

Use the DataLabels(Object) method to return the DataLabels collection. The following example sets the number format for data labels on the first series of the first chart in the active document.

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

Remarks

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.

Properties

Application

When used without an object qualifier, this property returns an _Application object that represents the Microsoft Word application. When used with an object qualifier, this property returns an Application object that represents the creator of the specified object (you can use this property with an OLE Automation object to return the application of that object). 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

Set to True if all objects in the collection automatically generate appropriate text based on context. Read/write Boolean.

Border

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

Count

Returns a Integer value that represents the number of objects in the collection.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Integer.

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 line, fill, and effect formatting for the object. Read-only ChartFormat.

HorizontalAlignment

Returns or sets a Object value that represents the horizontal alignment for the specified object.

Interior

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

Item[Object]

Returns a single object from the collection.

Name

Returns a String value that represents the name of the object.

NumberFormat

Returns or sets a String value that represents the format code for the object.

NumberFormatLinked

Set to 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 a Object value that represents the format code for the object as a string in the language of the user.

Orientation

Returns or sets a Integer value that represents the text orientation.

Parent

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

Position

Returns or sets a XlDataLabelPosition value that represents the position of the data labels.

ReadingOrder

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Integer.

Separator

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

Shadow

Returns or sets a Boolean value that determines if the object has a shadow.

ShowBubbleSize

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

ShowCategoryName

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

ShowLegendKey

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

ShowPercentage

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

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. Read/write Boolean (bool in C#).

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 a Object value that represents the vertical alignment of the specified object.

Methods

_Default(Object)

Reserved for internal use.

Delete()

Deletes the object.

GetEnumerator()
Propagate(Object)

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

Select()

Selects the object.

Applies to