Searching Puzzle Pieces

Type to search Puzzle Pieces.

Area Chart

The line chart's filled sibling — same config-first, responsive shape, plus a low-opacity fill wash under a full-strength 2px edge line. Pass stacked for cumulative bands, or leave it off for overlapping translucent areas.

Visits
monthVisits
Jan12.4k
Feb13.9k
Mar15.2k
Apr14.6k
May16.8k
Jun18.1k
Jul19.5k
Aug18.8k
Sep21.2k
Oct23.4k
Nov24.9k
Dec27.6k

Installation

Copy the piece and its math helper into your app — they compile with your build and the code is yours:

puzzle add piece area-chart

chart-math.js is a shared lib file — AreaChart imports it as ../../lib/chart-math.js. It ships alongside the piece; keep it in app/lib/.

Usage

import AreaChart from '@/components/ui/AreaChart.pzl';
<AreaChart data={ data } xKey="month" series={ [{ key: 'visits', label: 'Visits' }] } />

Stacked

Direct
Referral
Social
Direct, Referral, Social
monthDirectReferralSocial
Jan5.2k3.1k2.4k
Feb5.6k3.4k2.9k
Mar6.1k3.6k3.3k
Apr5.9k3.9k3.6k
May6.6k4.2k4.1k
Jun7.1k4.6k4.7k
Jul7.6k4.9k5.2k
Aug7.4k5.2k5.6k
Sep8.2k5.6k6.3k
Oct8.9k6.1k7k
Nov9.4k6.6k7.6k
Dec10.2k7.1k8.4k

Stacked bands are cumulative, so the top edge reads as the total. The tooltip still shows each channel's own value, not the running sum.

Overlapping

Aurora
Borealis
Aurora, Borealis
monthAuroraBorealis
Jan8.2k5.4k
Feb8.6k6.1k
Mar9.1k6.8k
Apr8.8k7.3k
May9.6k8.1k
Jun10.2k8.9k
Jul10.8k9.6k
Aug10.5k10.1k
Sep11.4k11.2k
Oct12.1k12.4k
Nov12.8k13.6k
Dec13.5k15.1k

Without stacked, series share the y=0 baseline and their translucent washes overlap — good for comparing two or three magnitudes directly.