Series.ApplyDataLabels Method (Excel)

Applies data labels to a series.

Syntax

.ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines, ShowSeriesName, ShowCategoryName, ShowValue, ShowPercentage, ShowBubbleSize, Separator)

A variable that represents a Series object.

Parameters

Name

Required/Optional

Data Type

Description

Type

선택

XlDataLabelsType

The type of data label to apply.

LegendKey

선택

Variant

True to show the legend key next to the point. The default value is False.

AutoText

선택

Variant

True if the object automatically generates appropriate text based on content.

HasLeaderLines

선택

Variant

For the Chart and Series objects, True if the series has leader lines.

ShowSeriesName

선택

Variant

Pass a boolean value to enable or disable the series name for the data label.

ShowCategoryName

선택

Variant

Pass a boolean value to enable or disable the category name for the data label.

ShowValue

선택

Variant

Pass a boolean value to enable or disable the value for the data label.

ShowPercentage

선택

Variant

Pass a boolean value to enable or disable the percentage for the data label.

ShowBubbleSize

선택

Variant

Pass a boolean value to enable or disable the bubble size for the data label.

Separator

선택

Variant

The separator for the data label.

Remarks

XlDataLabelsType can be one of these XlDataLabelsType constants.

xlDataLabelsShowBubbleSizes. The bubble size for the data label.

xlDataLabelsShowLabelAndPercent. Percentage of the total, and category for the point. Available only for pie charts and doughnut charts.

xlDataLabelsShowPercent. Percentage of the total. Available only for pie charts and doughnut charts.

xlDataLabelsShowLabel. Category for the point.

xlDataLabelsShowNone. No data labels.

xlDataLabelsShowValue. default. Value for the point (assumed if this argument isn't specified).

Example

This example applies category labels to series one in Chart1.

Charts("Chart1").SeriesCollection(1). _ 
 ApplyDataLabels Type:=xlDataLabelsShowLabel

참고 항목

개념

Series Object Members

Series Object