Skip to content

AreaChart

A trend line with the volume underneath filled. Monthly signups below are honest sample data, rendered as a static SVG with no tooltips.

Monthly signups

Area chart, 12 points, high Dec 120, low Jan 30Static area chart of Area chart. Values read left to right.050100150Jan: 30Feb: 34Mar: 42Apr: 45May: 52Jun: 58Jul: 61Aug: 70Sep: 78Oct: 88Nov: 102Dec: 120JanJanFebFebMarMarAprAprMayMayJunJunJulJulAugAugSepSepOctOctNovNovDecDec
<AreaChart data={signups} />

With values

Pass showValues to print each value above its point.

Weekly signups, 7 points, high Fri 30, low Mon 12Static area chart of Weekly signups. Values read left to right.0102030Mon: 12Tue: 18Wed: 15Thu: 22Fri: 30Sat: 28Sun: 20MonMonTueTueWedWedThuThuFriFriSatSatSunSun12181522302820
<AreaChart label="Weekly signups" data={weekly} showValues />

Props

PropTypeDefaultDescription
dataArray<{ label: string; value: number }>-Points in order, left to right.
widthnumber560viewBox width; the SVG scales to 100%.
heightnumber240viewBox height.
labelstring"Area chart"Chart name; opens the auto-summary.
showValuesbooleanfalsePrint each value above its point.
classstring-Style passthrough.

Static honesty

Static SVG, no tooltips; values appear in text only whenshowValues is set. The fill is the accent at 25% viacolor-mix, closed to the zero baseline. X labels longer than 8 characters are truncated with the full text kept in a<title>. The baseline is clamped into the viewBox, so negative values (not shown in the demos) fill below it.

Accessibility