OPF
DocsObject referenceView source

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

Definition
#/$defs/ChartDataLabels
Type
object
Source
spec/schemas/opf.schema.json

Field index

FieldTypeReq.Description
contentarray<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…
positionenum—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…
separatorstring—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.json
{
  "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.json
{
  "position": "auto"
}

separator

typestringrequirednodefault—

Text between the parts of a label that shows more than one. Defaults to ', '.

separator.json
{
  "separator": ", "
}