Documentation / @ripl/charts / SPACING
Variable: SPACING ​
constSPACING:object
Defined in: charts/src/constants/spacing.ts:8
The chart spacing scale.
Every gap between chart elements comes from this scale rather than a locally-chosen number, so spacing stays consistent as components are combined. It is an 8-point rhythm with a 4px half-step reserved for gaps inside a single component, where a full step would read as separation.
Type Declaration ​
lg ​
readonlylg:24=24
24px — generous separation.
md ​
readonlymd:16=16
16px — the chart's own padding, and the gap between an axis title and its tick labels.
none ​
readonlynone:0=0
No gap.
sm ​
readonlysm:8=8
8px — adjacent chart bands (title to legend, legend to plot) and two stacked axis bands.
xl ​
readonlyxl:32=32
32px — maximum separation.
xs ​
readonlyxs:4=4
4px — half-step, only for gaps within a single component (e.g. a legend swatch and its label).