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
widthnumberChart width (use ResponsiveContainer for responsive)
heightnumberChart height
marginobject{ top: 5, right: 5, bottom: 5, left: 5 }Chart margins
layout'horizontal' | 'vertical''horizontal'Layout direction
syncIdstringSync hover across charts with same ID
stack-offsetstringStack 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
stackIdstringStack ID for grouping
hidebooleanfalseHide the area
connectNullsbooleanfalseConnect across null values
isAnimationActivebooleantrueEnable animation
Copyright © 2026