config field — they’re a per-layer option on a geom, because a label attaches to a specific observation.
Options
boolean
default:"false"
Turn labels on for this layer.
'absolute' | 'percentage'
default:"absolute"
Show the raw value, or its share of the total.
'auto' | 'inside' | 'outside'
default:"auto"
Where the label sits relative to the observation.
'auto' lets the engine
fit, flip or drop labels as space allows; 'inside' and 'outside' render
exactly as asked.'start' | 'center' | 'end' | 'panel-start' | 'panel-end'
Anchor along the observation’s value axis.
'end' is the value tip whatever
the orientation. Only consulted when position is explicit.'start' | 'center' | 'end'
Anchor across the observation’s other axis. Only consulted when
position is
explicit.number
Gap in pixels between the observation’s edge and the label. Defaults to 4 for
bars and wedges, 12 for points and lines.
boolean
default:"false"
On stacked bars, print the stack total at the end of each stack.
boolean
default:"false"
On polar bars (pie/donut) prepend the category to the value (“North · 35%”).
On cartesian bars, emit a second category label per bar.
Examples
Percentage labels on a pie’s wedges, with the category name:Related
- Geoms & layers — where layer options live
- Number format — how label values are formatted

