Charts

One component per chart, one shared set of axis props. Pass data with a label and a value for a single series, or add series when you compare several.

LineChart: one series

050100150200MonTueWedThuFriSatSun
Component Source
<LineChart data={[{ label: "Mon", value: 120 }, { label: "Tue", value: 148 }]} />

LineChart: area, no y axis

MonTueWedThuFriSatSun
Component Source
<LineChart type="area" data={trend} height={120} showYAxis={false} />

LineChart: step

020406080MonTueWedThuFriSatSun
Component Source
<LineChart curve="step" data={balance} />

LineChart: several series

WebiOSAndroid
050100150200MonTueWedThuFriSatSun
Component Source
<LineChart data={rows} series={series} />

LineChart: stacked area

WebiOSAndroid
0100200300400MonTueWedThuFriSatSun
Component Source
<LineChart type="area" stacked data={rows} series={series} />

BarChart: one series, per-bar tone

050100150200MonTueWedThuFriSatSun
Component Source
<BarChart data={[{ label: "Mon", value: 24, tone: "success" }, { label: "Tue", value: 12 }]} />

BarChart: negative values

-40-30-20-10010203040MonTueWedThuFriSatSun
Component Source
<BarChart data={[{ label: "Mon", value: 24 }, { label: "Tue", value: -12 }]} />

BarChart: ranking

02k4k6k/pricing/docs/getting-started/blog/launch/changelog
Component Source
<BarChart orientation="horizontal" data={ranked} yFormat="compact" />

BarChart: compare two periods

This weekLast week
050100150MonTueWedThuFriSatSun
Component Source
<BarChart data={compare} series={[{ key: "thisWeek", name: "This week" }, { key: "lastWeek", name: "Last week", tone: "neutral" }]} />

BarChart: horizontal and stacked

WebiOSAndroid
0100200300400MonTueWedThuFriSatSun
Component Source
<BarChart orientation="horizontal" mode="stacked" data={rows} series={series} />

Sparkline

Axis-free and decorative: it fills its container, so size it with className.

Axis-free and decorative: it fills its container, so size it with className.
<Sparkline data={[4, 7, 5, 9, 12, 10, 14]} className="h-10 w-32" />
<Sparkline type="bar" tone="success" data={[3, 5, 2, 8, 6, 9]} className="h-12 w-40" />

Heatmap

9
11
13
15
17
19
Mon
45
61
77
93
109
125
Tue
101
117
45
61
77
93
Wed
69
85
101
117
45
61
Thu
125
53
69
85
101
117
Fri
93
109
125
53
69
85
Sat
36
52
68
84
100
28
Sun
92
20
36
52
68
84
Component Source
<Heatmap rows={days} columns={hours} values={grid} />

FunnelChart: both directions

1. Visited pricing24,800
2. Started sign-up6,900 · 72% drop
3. Verified email5,100 · 26% drop
4. Connected a source2,780 · 45% drop
5. Viewed dashboard2,310 · 17% drop
24,800
Visited pricing
100%
6,900−72%
Started sign-up
28%
5,100−26%
Verified email
21%
2,780−45%
Connected a source
11%
2,310−17%
Viewed dashboard
9.3%
Component Source
<FunnelChart steps={steps} />
<FunnelChart orientation="vertical" steps={steps} />

DonutChart

Accounts914
Free640 70%
Team210 23%
Business64 7%
Component Source
<DonutChart centerLabel="Accounts" data={plans} />

LineChart props

PropTypeDefaultDescription
curve"linear" | "smooth" | "step"—`step` holds each value until the next point (balances, plans, queue depth).
data*Record<string, any>[]—One record per x position: `label` plus a number under each series `key` (`value` when `series` is omitted).
heightnumber—Chart height in px (default 260).
paddingChartPadding—Plot padding in px, merged over the defaults.
seriesSeriesSpec[]—Omit for a single series of `value`s.
showDotsbooleantrueDraw a dot on every point (default true when 16 points or fewer).
showGridboolean——
showLegendboolean——
showXAxisboolean——
showYAxisboolean——
stackedboolean—Stack the series on top of each other instead of overlaying them.
tickCountnumber—Number of y-axis intervals (default 4, so 5 ticks).
type"line" | "area"—`area` fills under each line (stacked areas when `stacked`).
xLabelEverynumber—Show every Nth x label, starting with the first (default 1).
xLabelEveryMobilenumber—Below the md breakpoint show every Nth label instead (hides the rest on small screens).
xLabelsstring[]—Explicit x labels to show (matched against each datum's `label`); overrides the stride props.
yFormat"number" | "compact" | "currency" | "percent"——
yMaxnumber—Fixed y-axis maximum; defaults to a rounded data maximum.
yPrefixstring——
ySuffixstring——

* required

BarChart props

PropTypeDefaultDescription
barGapnumber—Gap between categories in px (default: 30% of the slot).
barRadiusChartBarRadiussmBar corner radius token (default "sm").
data*Record<string, any>[]—One record per category: `label` plus a number under each series `key`. Without `series`, the number is `value`, and a datum may carry its own `tone` or `color`.
heightnumber—Chart height in px (default 260).
maxBarWidthnumber—Maximum bar width in px.
mode"grouped" | "stacked"—`grouped` puts the series side by side per category (comparison); `stacked` adds them up.
orientation"vertical" | "horizontal"—`horizontal` puts categories on the y axis, good for long labels and rankings.
paddingChartPadding—Plot padding in px, merged over the defaults.
seriesSeriesSpec[]—Omit for a single series of `value`s.
showGridboolean——
showLegendboolean——
showXAxisboolean——
showYAxisboolean——
tickCountnumber—Number of y-axis intervals (default 4, so 5 ticks).
xLabelEverynumber—Show every Nth x label, starting with the first (default 1).
xLabelEveryMobilenumber—Below the md breakpoint show every Nth label instead (hides the rest on small screens).
xLabelsstring[]—Explicit x labels to show (matched against each datum's `label`); overrides the stride props.
yFormat"number" | "compact" | "currency" | "percent"——
yMaxnumber—Fixed y-axis maximum; defaults to a rounded data maximum.
yPrefixstring——
ySuffixstring——

* required

Sparkline props

PropTypeDefaultDescription
data*SparklinePoint[]—Numbers, or objects with a `value` (and an optional per-bar `tone` / `color`).
type"line" | "area" | "bar"lineDefault "line".
toneChartToneaccentColour of the line, area or bars. Default accent.
curve"linear" | "smooth"smoothLine and area only. Default "smooth".
barRadiusChartBarRadiussmBar corner radius token (default "sm").
barGapnumber4)Gap between bars in px (default 4).

* required

Heatmap props

PropTypeDefaultDescription
rows*string[]——
columns*string[]——
values*(number | null)[][]—`values[row][column]`. Use `null` for cells with no data (they stay empty, like the lower triangle of a cohort table).
tone"accent" | "success" | "warning" | "danger"—Colour of the filled cells (a theme tone).
maxnumber—Value that maps to full intensity; defaults to the largest value.
formatChartYFormat——
showValuesbooleantrue)Print the value inside each cell (default true).
minColumnWidthnumber—Narrowest a column may get before the heatmap scrolls sideways, in px.
labelWidthstring—Width of the row label column.
rowLabelTitlestring——

* required

FunnelChart props

PropTypeDefaultDescription
steps*FunnelStep[]——
orientation"horizontal" | "vertical"—`horizontal` stacks a bar per step; `vertical` draws a column per step, left to right.
centeredboolean—`centered` (horizontal only) centres each bar so the stack narrows like a funnel.
heightnumber—Height of the columns in px (vertical).
showDropOffbooleantrue)Show the drop-off between steps (default true).

* required

DonutChart props

PropTypeDefaultDescription
data*DonutDatum[]——
sizenumber160)Diameter in px (default 160).
thicknessnumber18)Ring thickness in px (default 18).
centerLabelstring—Small text in the centre, above the value.
centerValueReactNode—Large text in the centre. Defaults to the total.
showLegendboolean——

* required

Configure Theme
Theme
Accent Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font