Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.1 KB

Excel.Chart.ApplyDataLabels.md

File metadata and controls

53 lines (36 loc) · 2.1 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Chart.ApplyDataLabels method (Excel)
vbaxl10.chm149171
vbaxl10.chm149171
Excel.Chart.ApplyDataLabels
20966609-9713-c644-81d7-196b06169975
04/16/2019
medium

Chart.ApplyDataLabels method (Excel)

Applies data labels to all the series in a chart.

Syntax

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

expression A variable that represents a Chart object.

Parameters

Name Required/Optional Data type Description
Type Optional XlDataLabelsType The type of data label to apply.
LegendKey Optional Variant True to show the legend key next to the point. The default value is False.
AutoText Optional Variant True if the object automatically generates appropriate text based on content.
HasLeaderLines Optional Variant For the Chart and Series objects, True if the series has leader lines.
ShowSeriesName Optional Variant Pass a Boolean value to enable or disable the series name for the data label.
ShowCategoryName Optional Variant Pass a Boolean value to enable or disable the category name for the data label.
ShowValue Optional Variant Pass a Boolean value to enable or disable the value for the data label.
ShowPercentage Optional Variant Pass a Boolean value to enable or disable the percentage for the data label.
ShowBubbleSize Optional Variant Pass a Boolean value to enable or disable the bubble size for the data label.
Separator Optional Variant The separator for the data label.

Example

This example applies category labels to series one on Chart1.

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

[!includeSupport and feedback]