Skip to content
caliper ui docs

Pro

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
pnpm dlx shadcn@latest add @caliper/stacked-area-chart

Halden revenue, 2025

Enterprise grew fastest, to $97k of $188k MRR in December.

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
Installs components/ui/stacked-area-chart.tsxDepends on d3-shapeMotion none in component source

When to use

Use it for

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

Skip it when

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

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { StackedAreaChart } from "@/components/ui/stacked-area-chart"

The worked example comes with Pro

The 37-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

StackedAreaChart

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

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.

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

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Time-series charts examples