Data Labels

Note The BoxPlot and TagCloud charts have no data label.
<dataLabels type="string" visible="Boolean">
    <style>    
    <layout>
    <format>
Attribute Type or Value  
type string (see values below) The type of data caption to display
visible Boolean Specifies whether the labels should be displayed in the chart

The following table describes the possible type attribute values.

Attribute Value Description
Auto A label is added automatically.
Value The data caption displays the value. This corresponds to a value axis.
Label The data caption displays the category. This corresponds to a category axis.
Percent The data caption displays the values in percent.
LabelAndValue The data caption displays the category followed by the value.
LabelAndPercent The data caption displays the category followed by the value in percent.
XValue The data caption displays the second value corresponding to the second value axis.
Weight The data caption displays the category followed by the value.
Scale The data caption displays the value corresponding to the bubble width.
The charts do not display all data label types. The following table shows the possible types of data labels per type of chart.
Attribute Value Type of chart
Auto All except Waterfall
Value All
Label All except Line, DualLine, Surface, Radar, and HeatMap
Percent All except Point series, Radar, HeatMap, and Waterfall
LabelAndValue Pie series only
LabelAndPercent Pie series only
XValue Point series only
Weight TreeMap only
Scale Bubble and PolarBubble charts only

The following table shows the <dataLabels> children elements.

Element Description
<style> The style of a label defines the following properties:
  • <border>, which is the border thickness and color
  • <background>, which is the background color
  • <font>, which defines the label font properties (size, face, italic, bold, strikethrough, underline, and RGB color)
  • <alignment>, which defines the text alignment (horizontal, vertical, and text policy). The text policy can be Wrap, NoWrap or Truncate.
<layout> Attributes:
  • autoHiding, which defines whether labels are hidden automatically when there is not enough space
  • resolveOverlapping, which defines whether the overlapped labels are resolved
  • position (InsideFirstOutsideOtherwise|OutsideFirstInsideOtherwise|Inside|Outside)
  • orientation (Horizontal|Vertical)
  • spacing, which defines the margin and whose value range is [0, 8]
  • mode, which defines the display mode for Pie charts only (Side|Circular)
  • singleLine, which defines whether the data label is on one single line (for LabelAndValue or LabelAndPercent type only)
  • percentMinValue, which defines the minimum percent value to display for Pie charts only. Value range is [0.0, 100.0] with a step of 0.01.
Layout also shows the <separator> child element to define the starting and ending symbols to use in data labels in the case of a Pie chart. The string maximum length for a value is 256.
<format> The expression to use to format and display tick values.
Note For Percent or LabelAndPercent type only.

Example

<dataLabels type="LabelAndPercent" visible="false">
    <style>
        <border thickness="None">
            <color rgb="#000000" alpha="255"/>
        </border>
        <background>
            <color rgb="#000000" alpha="0"/>
        </background>
        <font size="8" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#707070"/>
        <alignment textPolicy="NoWrap"/>
    </style>
    <layout autoHiding="true" resolveOverlapping="false" mode="Side" position="Outside" spacing="0" singleLine="true" 
        percentMinValue="10.0">
        <separator>
            <start>(</start>
            <end>)</end>
        </separator>
    <format default="true" sample="1234,57" type="Custom">
        <template positive="0.00"/>
    </format>
</dataLabels>