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

Set data.parsingLocale to control parsing of data cells and values written in the spec. It defaults to en-US and also controls display formatting unless you set formattingLocale on GraphProvider. See Formatting & locale.