Charts

Area Chart

Build area charts to display quantitative data with filled regions

Area charts display quantitative data with the area between the axis and the line filled with color. They are ideal for showing magnitude of change over time.

Simple Area Chart

A basic area chart with a single data series.

Stacked Area Chart

Use stack-id to stack areas on top of each other.

Gradient Area Chart

Define <linearGradient> inside the chart and reference it with fill="url(#gradientId)".

Step Area Chart

Use type="step" for step-wise transitions.

Area Chart with Legend

Add <Legend> to show series labels.

Change curve type

Set the type prop on <Area> to control interpolation:

TypeDescription
monotoneSmooth curve preserving monotonicity
linearStraight line segments
stepStep-wise transitions
naturalNatural cubic spline
basisB-spline curve

AreaChart props

PropTypeDefaultDescription
dataArray[]Data array for the chart
widthnumber—Chart width (use ResponsiveContainer for responsive)
heightnumber—Chart height
marginobject{ top: 5, right: 5, bottom: 5, left: 5 }Chart margins
layout'horizontal' | 'vertical''horizontal'Layout direction
syncIdstring—Sync hover across charts with same ID
stack-offsetstring—Stack offset type (expand for 100% stacked)

Area props

PropTypeDefaultDescription
dataKeystring | number | FunctionrequiredKey from data to plot
typeCurveType'linear'Curve interpolation type
fillstring'#3182bd'Fill color
strokestring'#3182bd'Stroke color
fillOpacitynumber0.6Fill opacity
stackIdstring—Stack ID for grouping
hidebooleanfalseHide the area
connectNullsbooleanfalseConnect across null values
isAnimationActivebooleantrueEnable animation
transitionAnimationOptions{ duration: 0.8, ease: 'easeOut' }Animation timing (motion-v)
Copyright © 2026