Chart.ApplyDataLabels (Word)
Applies data labels to all the series in a chart.
ApplyDataLabels (Type, LegendKey, AutoText, HasLeaderLines, ShowSeriesName, ShowCategoryName, ShowValue, ShowPercentage, ShowBubbleSize, Separator)
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1). _
ApplyDataLabels Type:=xlDataLabelsShowLabel
End If
End With
Arguments
Optional arguments
The following arguments are optional
Type (XlDataLabelsType) - One of the enumeration values that specifies the type of data label to apply. Can be one of the xlDataLabelsType constants.
Possible values are
xlDataLabelsShowBubbleSizes | Show the size of the bubble in reference to the absolute value. |
xlDataLabelsShowLabel | The category for the point. |
xlDataLabelsShowLabelAndPercent | The percentage of the total, and the category for the point. Available only for pie charts and doughnut charts. |
xlDataLabelsShowNone | No data labels. |
xlDataLabelsShowPercent | The percentage of the total. Available only for pie charts and doughnut charts. |
xlDataLabelsShowValue | The default value for the point (assumed if this argument is not specified). |
LegendKey (String) - True to show the legend key next to the point. The default is False.
AutoText (String) - True if the object automatically generates appropriate text based on content.
HasLeaderLines (Boolean) - For the Chart and Series objects, True if the series has leader lines.
ShowSeriesName (Boolean) - True to enable the series name for the data label; otherwise, False.
ShowCategoryName (Boolean) - True to enable the category name for the data label; otherwise, False.
ShowValue (Boolean) - True to enable the value for the data label; otherwise, False.
ShowPercentage (Boolean) - True to enable the percentage for the data label; otherwise, False.
ShowBubbleSize (Boolean) - True to enable the bubble size for the data label; otherwise, False.
Separator (String) - The separator for the data label.