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

<AreaChart> takes the chart container props, including bar sizing.

Area props

PropTypeDefaultDescription
data-keyrow path or accessorrequiredField with the value
typeCurveType'linear'Curve interpolation, see above
stack-idstring | number—Areas with the same id stack
base-valuenumber | 'dataMin' | 'dataMax'—Where the fill starts
fillstringseries paletteFill color
fill-opacitynumber0.6Fill opacity
strokestringseries paletteOutline color; 'none' hides the outline
stroke-widthnumber—Outline width
dotboolean | objectfalseShow a dot on every point; an object sets dot attributes
active-dotboolean | objecttrueShow a dot on the active point
labelboolean | object—Show a value label on every point
connect-nullsbooleanfalseDraw across missing values
x-axis-id, y-axis-idstring | number0Axes this series uses
namestring | number—Name in the legend and tooltip
unitstring | number—Unit after tooltip values
legend-typeLegendType'line'Legend icon
tooltip-type'none'—Set 'none' to leave the series out of the tooltip
hidebooleanfalseHide the series
classstring—Class on the series layer
is-animation-activebooleanthe chart's valueAnimate this series
transitionChartTransitionthe chart's valueTiming and easing of data changes

Events: @click, @mouseenter, @mouseleave with (point, index, event), and @animation-start, @animation-end.

Area slots

SlotPropsDescription
#dot{ cx, cy, r, fill, stroke, strokeWidth, … }Replace a point dot
#activeDot{ cx, cy, r, fill, stroke, index, dataKey, payload, value }Replace the active dot
#labelLabelListSlotPropsReplace a point label
Copyright © 2026