Skip to main content
An area chart is a line with the region beneath it filled. Use geom.area() to emphasise magnitude across an ordered or continuous x-axis, and its stacked form for part-to-whole trends.

Basic example

Stacked area

Map a category to color and stack the layers for a part-to-whole trend. In long format, one row per month × region:
Use position: 'fill' instead for a 100% stacked area, where each band shows its share of the total.

Points on the area

Add a geom.point() layer to mark every vertex. It shares the spec-level mapping, so both layers plot the same series. Pipe it after the area so the dots sit on top, and set interactive: false on the point layer:
interactive: false keeps the points out of hit-detection so the area owns hover — it resolves the nearest point along the x-axis and drives the tooltip. Interactive points would make hover fire only when the cursor lands directly on a dot.

Options

geom.area() shares the line’s rendering knobs:
params.interpolate
'linear' | 'catmull-rom'
default:"linear"
Curve family. 'catmull-rom' smooths the outline through every point.
params.lineWidth
number | 'auto'
Outline stroke width in pixels.
params.missingValues
'gap' | 'connect' | 'zero'
default:"gap"
How the outline handles null values: break at the gap, span it, or treat as zero.
  • Line — an unfilled outline, or a fading gradient fill via showFill
  • Geoms & layers — stacking and position modes