/

Area Chart

Show quantitative data over a continuous interval with filled regions. Great for cumulative values and volume comparisons.

Usage

example.tsx
import { AreaChart } from "@chartts/react"

<AreaChart
  data={trafficData}
  x="date"
  y={["pageViews", "uniqueVisitors"]}
  stacked
  gradient
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for x-axis values
ykeyof T | (keyof T)[]Key(s) for area values
stackedbooleanStack areas. Default: false
curve'linear' | 'monotone' | 'step' | 'natural'Curve type. Default: 'monotone'
gradientbooleanApply vertical gradient fill. Default: true
opacitynumberFill opacity. 0-1. Default: 0.3

Features

  • Stacked and overlapping modes
  • Gradient fills with configurable opacity
  • Smooth curve interpolation
  • Baseline support (zero, min, wiggle)
  • Interactive hover crosshair
  • Animated reveal on mount

Other Charts