layout section controls the whitespace around the chart — the outer padding, and the gaps between the regions the engine arranges (header, legend, axes, plot).
Padding
Outer padding in pixels, applied on all four sides.
null uses the engine
default.Region gaps
The chart is laid out as a grid of named regions.gaps overrides the spacing around any of them; anything left unset keeps the default.
after gap) or { before, after } to set each edge independently.
The overridable regions are:
Adjacent regions share a boundary using a
max(previous.after, next.before)
rule, so a lone after can’t shrink a boundary below the following region’s
before.Related
- Appearance — background, border and corner radius
- Legend — legend position feeds the region layout

