Skip to main content
Titles, axes, legend, headline numbers and number formatting are configuration. You add them by piping a config(...) part into the spec. Space around the title, legend, axes and footer is margin on the stylesheet; see Layout.

How config composes

config is a spec part like any other and follows the same pipe rules, with one difference: config deep-merges. Piping several config(...) parts combines them instead of replacing, so a shared base can carry per-chart overrides:
Anything you leave unset keeps its default.

Sections

Data labels are a per-layer geom option rather than a config section, because a label belongs to one observation.
Paint is a separate surface. The graph background, the panel border, grid and tick strokes, label typography and the space around title, legend, axes and footer all come from a stylesheet you pipe in as styles({...}). See Styling and Layout.
style.graph({ textScale }) multiplies every text size. It changes measured text, and so the size of every region, which is why it is documented with Layout.

Locale

'en-GB' | 'en-US' | 'ar' | 'pt-PT'
default:"en-US"
The locale used to read source values, and the fallback for formatting display output: axis labels, tick labels, tooltips and headline numbers. Pass formattingLocale to GraphProvider to override display only; it resolves as formattingLocale ?? parsingLocale.