Area Chart

A smooth, composable area chart built with D3.js and styled using Tailwind.

Example

Revenue
Expenses

Installation

./components/charts/AreaChart.tsx

How It Works

The Area Chart builds on the Line Chart by filling the space beneath the line using d3.area. It supports multiple series and automatic scaling.

  • AreaChart.Container – Provides chart context
  • AreaChart.Area – Draws the filled area for each series
  • AreaChart.XAxis and AreaChart.YAxis – Render chart axes
  • AreaChart.Legend – Displays color and label mapping