Skip to content
caliper ui pro docs

Stacked area chart

Parts of a whole over time, stacked from the baseline. Switching between values and share morphs the same layers, so growth and share read as one picture.

Pro
MRR by plan ($k)

MRR by plan ($k)
PeriodStarterTeamEnterpriseTotal
Jan18243072
Feb20.227.130.5577.85
Mar22.430.232.284.8
Apr21.633.334.9589.85
May23.836.438.899
Jun2639.543.75109.25
Jul25.242.649.8117.6
Aug27.445.756.95130.05
Sep29.648.865.2143.60000000000002
Oct28.79999999999999751.90000000000000674.55000000000001155.25
Nov315585171
Dec33.258.196.55000000000001187.85000000000002

When to use

  • Revenue by plan, traffic by source or spend by team across months.
  • Questions about both size and mix.

When not to use

  • Series that do not add up to a total; use the line chart.
  • More than five or six layers; the middle ones become unreadable.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/stacked-area-chart

Adds its 8 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

StackedAreaChart

10 props
PropTypeDefault
label *string—
data *readonly ChartDatum[]—
series *readonly ChartSeries[]—
unitstring""
mode"values" | "share""values"
heightnumber260
formatValue((value: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes group and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/stacked-area-chart.md

The index of every part is at /llms.txt.

More in Time-series charts