Skip to main content
A chart type is a recipe: a geom, a coordinate system, a position mode and the scales you declare. A column chart and a pie chart use the same 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 maps color or group, several observations share one x value. The layer’s position decides how they are arranged:
Each geom has its own default, so a multi-group layer looks right before you set anything:

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 a pipe(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:
Layers draw in the order you pipe them, so later geoms sit on top. Give a layer an 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.