AreaChart
Same props as LineChart with the area under each line filled, including smooth.
Props
labelsstring[]Names of the x positions / categories.
series{ name, values: number[], color? }[]One entry per series;
valueshas one number per label.heightnumberDefault:300Chart height in px (width follows the container).
labelstringAccessible name for the chart.
legendbooleanDefault:trueShow the legend when there are several series.
smoothbooleanDefault:falseDraw curves instead of straight segments. They pass through every point and never overshoot it.
animatebooleanDefault:trueAnimate the chart in when it appears and glide it to new values when the data changes (skipped for users who prefer reduced motion).
classNamestringDefault:''Extra classes for the root element.
| Prop | Type | Default | Description |
|---|---|---|---|
labels | string[] | – | Names of the x positions / categories. |
series | { name, values: number[], color? }[] | – | One entry per series; values has one number per label. |
height | number | 300 | Chart height in px (width follows the container). |
label | string | – | Accessible name for the chart. |
legend | boolean | true | Show the legend when there are several series. |
smooth | boolean | false | Draw curves instead of straight segments. They pass through every point and never overshoot it. |
animate | boolean | true | Animate the chart in when it appears and glide it to new values when the data changes (skipped for users who prefer reduced motion). |
className | string | '' | Extra classes for the root element. |