Chart Data Labels
Data label settings. A label shows the selected content parts in the fixed order category, value, percent, joined by the separator.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| content | array<enum> | — | Which parts a label shows. Defaults to ['value']. 'percent' is the share of the total and exists only on pie and doughnut charts; 'category' shows the category name (the X value on a scatter chart). A part a chart type cannot show is dropped with a 'chart-option-adapted' diagnos… |
| position | enum | — | Where a label sits relative to its mark. 'auto' (the default) is the type's default: outside-end for clustered columns and bars, pie slices and the histogram, pareto and waterfall constructs; center for stacked columns and bars; above for line and scatter points. Clustered colum… |
| separator | string | — | Text between the parts of a label that shows more than one. Defaults to ', '. |
content
typearray<enum>requirednodefault—
Which parts a label shows. Defaults to ['value']. 'percent' is the share of the total and exists only on pie and doughnut charts; 'category' shows the category name (the X value on a scatter chart). A part a chart type cannot show is dropped with a 'chart-option-adapted' diagnos…
{
"content": []
}position
typeenumrequirednodefault—
Where a label sits relative to its mark. 'auto' (the default) is the type's default: outside-end for clustered columns and bars, pie slices and the histogram, pareto and waterfall constructs; center for stacked columns and bars; above for line and scatter points. Clustered colum…
{
"position": "auto"
}separator
typestringrequirednodefault—
Text between the parts of a label that shows more than one. Defaults to ', '.
{
"separator": ", "
}