panelui

Area Chart

Component

About

Filled bands over time, stacked or overlaid.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Area Chart to your project and fits it to your theme.

Code

How Area Chart is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client';

import { AreaChart } from '@/components/ui/panel-area-chart';
const SIGNUPS = [
  { week: 'W1', free: 420, team: 180 },
  { week: 'W2', free: 480, team: 240 },
  { week: 'W3', free: 450, team: 310 },
  { week: 'W4', free: 530, team: 290 },
  { week: 'W5', free: 610, team: 370 },
  { week: 'W6', free: 580, team: 460 },
  { week: 'W7', free: 640, team: 520 },
];

const LABELS = { free: 'Free', team: 'Team' };

export default function AreaChartOverlaid() {
  return (
    <AreaChart data={SIGNUPS} xDataKey="week" className="max-w-lg" label="Signups per week, by plan">
      <AreaChart.Header title="Signups per week" labels={LABELS} legend />
      <AreaChart.Grid />
      <AreaChart.Area dataKey="free" color="primary" />
      <AreaChart.Area dataKey="team" color="info" />
      <AreaChart.YAxis />
      <AreaChart.XAxis />
      <AreaChart.Tooltip labels={LABELS} />
    </AreaChart>
  );
}

Dependencies

More by panelui

View all
  • Spinner

    Spinner

    7
  • Flow

    Flow

    3
  • Treemap Chart

    Treemap Chart

    1
  • Soundwave

    Soundwave

    1
  • Share

    Share

    1
  • Scatter Chart

    Scatter Chart

    1
  • Pyramid Chart

    Pyramid Chart

    1
  • Model Picker

    Model Picker

    1