config field — they’re a per-layer option on a geom, because a label attaches to a specific observation.
Options
Turn labels on for this layer.
Show the raw value, or its share of the total.
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.Anchor along the observation’s value axis.
'end' is the value tip whatever
the orientation. Only consulted when position is explicit.Anchor across the observation’s other axis. Only consulted when
position is
explicit.Gap in pixels between the observation’s edge and the label. Defaults to 4 for
bars and wedges, 12 for points and lines.
On stacked bars, print the stack total at the end of each stack.
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

