geom.bar(); only the coordinate system differs.
The building blocks
Every spec combines five kinds of ingredient:
A geom’s
params are geometry: the bar’s band width, the line’s curve, how a path handles nulls. Paint lives in the stylesheet: see Styling.
Geoms
Six geoms are built in, and every recipe below uses one or more of them. Six more ship as geom packages (@graphysdk/geom-<name>) registered through createGraphyKit; their pages are listed at the end. Your own plugin can add more: see custom geoms.
Position modes
When a layer mapscolor or group, several observations share one x value. The layer’s position decides how they are arranged:
Coordinate systems
theta names the aesthetic that sweeps the angle and defaults to 'x'. startAngle is in degrees and defaults to 0. innerRadius is a fraction of the outer radius, from 0 to 1, and defaults to 0.
Common recipes
Each is apipe(createSpec(...), ...) chain. The scales are left out here, but every mapped position aesthetic needs one.
Layers
A geom is a layer. Add several to one spec and they draw over each other. They share the spec-level mapping unless a layer overrides it. This is how combos and decorated lines are built:id and a stylesheet entry can target it with { layer: 'trend' }, which is how one layer is styled apart from the rest.
Every recipe also animates in when it mounts, tuned through the renderer’s animation prop.
Guides for each type
Each page in this section covers one chart type end to end: data shape, spec and the options that matter most.- Line — trends over a continuous or ordered x-axis
- Bar & column — vertical columns for comparing categories, horizontal bars for ranking
- Area — filled trends, stacked or plain
- Pie & donut — parts of a whole
- Radar & radial — categories compared around a circle
- Scatter & bubble — correlation and three-variable plots
- Heatmap & waffle — a value per cell of a band × band grid
- Dumbbell — two or more values per band, joined by a connector
- Lollipop — a head at the value on a stem from zero
- Candlestick — open, high, low and close per session
- Boxplot — the spread of values per band
- Waterfall — a running total, step by step
- Funnel — how many reach each stage
- Combo — two metrics on dual axes
Most other charts are a small change to a recipe above: swap the geom, add
coord.flip(), or change the position.
