geom.bar(); they differ only in coordinate system.
The building blocks
Every spec is assembled from five kinds of ingredient:
A geom’s
params are geometry — the bar’s band width, the line’s curve family, how a path handles nulls. Everything a mark is painted with lives in the stylesheet: see Styling.
Geoms
There are six built-in geoms. Everything in the recipes below is one of these, sometimes layered. A plugin can contribute more — see custom geoms:Position modes
When a geom mapscolor (or group), multiple observations share an x value. The layer’s position decides how they arrange:
Coordinate systems
startAngle is in degrees and defaults to 0; innerRadius is a 0–1 fraction of the outer radius and defaults to 0.
Common recipes
Reach for these as starting points. Each is apipe(createSpec(...), ...) chain; the scales are elided for brevity but always required for mapped position aesthetics.
Layers
A geom is a layer. Add several to one spec and they draw over each other, sharing the spec-level mapping unless a layer overrides it. This is how combos and decorated lines are built:id and a stylesheet entry can scope to it with { layer: 'trend' }, which is how one series in a stack of layers reads differently from the rest.
Every recipe here also gets an entrance animation when it mounts, tuned through the renderer’s animation prop.
Guides for each type
The pages in this section walk through a specific 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 category × category grid
- Combo — two metrics on dual axes
Don’t see the chart you need? Because charts are composed from these
ingredients, most are a small tweak to a recipe above — swap the geom, add
coord.flip(), or change the position.
