Skip to main content
A chart type is a recipe you compose — a geom, a coordinate system, a position mode, and the scales you declare. A vertical bar chart and a pie chart use the same geom.bar(); they differ only in coordinate system.

The building blocks

Every spec is assembled from four kinds of ingredient:

Geoms

There are five built-in geoms. Everything in the recipes below is one of these, sometimes layered:

Position modes

When a geom maps color (or group), multiple observations share an x value. The layer’s position decides how they arrange:

Coordinate systems

Common recipes

Reach for these as starting points. Each is a pipe(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:
Layers are drawn in the order you pipe them — later geoms sit on top.

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
  • 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.