Share via


Chart.ApplyDataLabels Method

Applies data labels to all the series in a chart.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Sub ApplyDataLabels ( _
    Type As XlDataLabelsType, _
    LegendKey As Object, _
    AutoText As Object, _
    HasLeaderLines As Object, _
    ShowSeriesName As Object, _
    ShowCategoryName As Object, _
    ShowValue As Object, _
    ShowPercentage As Object, _
    ShowBubbleSize As Object, _
    Separator As Object _
)
'Usage
Dim instance As Chart
Dim Type As XlDataLabelsType
Dim LegendKey As Object
Dim AutoText As Object
Dim HasLeaderLines As Object
Dim ShowSeriesName As Object
Dim ShowCategoryName As Object
Dim ShowValue As Object
Dim ShowPercentage As Object
Dim ShowBubbleSize As Object
Dim Separator As Object

instance.ApplyDataLabels(Type, LegendKey, _
    AutoText, HasLeaderLines, ShowSeriesName, _
    ShowCategoryName, ShowValue, ShowPercentage, _
    ShowBubbleSize, Separator)
void ApplyDataLabels(
    XlDataLabelsType Type,
    Object LegendKey,
    Object AutoText,
    Object HasLeaderLines,
    Object ShowSeriesName,
    Object ShowCategoryName,
    Object ShowValue,
    Object ShowPercentage,
    Object ShowBubbleSize,
    Object Separator
)

Parameters

  • LegendKey
    Type: System.Object
    True to show the legend key next to the point. The default value is False.
  • AutoText
    Type: System.Object
    True if the object automatically generates appropriate text based on content.
  • ShowSeriesName
    Type: System.Object
    Pass a boolean value to enable or disable the series name for the data label.
  • ShowCategoryName
    Type: System.Object
    Pass a boolean value to enable or disable the category name for the data label.
  • ShowValue
    Type: System.Object
    Pass a boolean value to enable or disable the value for the data label.
  • ShowPercentage
    Type: System.Object
    a boolean value to enable or disable the percentage for the data label.
  • ShowBubbleSize
    Type: System.Object
    Pass a boolean value to enable or disable the bubble size for the data label.
  • Separator
    Type: System.Object
    The separator for the data label.

Remarks

The following table shows the XlDataLabelsType arguments that can be passed to the Type parameter of a ApplyDataLabels(XlDataLabelsType, Object, Object, Object, Object, Object, Object, Object, Object, Object) method.

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).

See Also

Reference

Chart Interface

Chart Members

Microsoft.Office.Interop.Word Namespace