Skip to main content

Overview

Data labels display numeric values directly on chart elements like bars, columns, lines and pie slices. They make it easier to read exact values without relying on tooltips or axes.

Show data labels

dataLabels.showDataLabels
boolean
default:"false"
Whether to show numeric data labels on the chart. When true, values appear directly on bars, columns, line points and pie slices.
Data labels respect the number formatting configured in appearance.numberFormat, including decimal places and abbreviations.

Label format

dataLabels.dataLabelFormat
'absolute' | 'percentage'
default:"absolute"
Format to use for the data labels: - 'absolute' - Show the actual value from the data - 'percentage' - Show values as percentages (calculated differently for each graph type)

Absolute values

Show the actual numeric values:

Percentage values

Show values as percentages. The calculation method depends on the chart type: For stacked charts:
  • Shows each segment as a percentage of the total stack
For pie/donut charts:
  • Shows each slice as a percentage of the total
For other charts:
  • Shows each value as a percentage of the total sum

Stack totals

dataLabels.showStackTotals
boolean
default:"false"
Whether to show total values above stacked bar or column stacks. Only applicable to stacked bar and column charts.
showStackTotals and showDataLabels can be used together. This shows both the individual segment values and the total for each stack.

Category labels

dataLabels.showCategoryLabels
boolean
default:"false"
Whether to show category names on pie and donut charts. Only applicable to pie and donut chart types. When true, category names appear next to each slice.

Combining data labels

You can combine different data label options for comprehensive labelling:

Stacked chart with totals and segment labels

Pie chart with categories and percentages

Chart type compatibility

Different data label options work with different chart types:

Complete example