heygaia

Pie Chart

Dashboards 9

About

A pie chart card for showing proportions of a whole, with donut, inline-label, and legend display modes.

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

Code

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

Usage.tsx

"use client";

import { PieChart } from "@/components/ui/pie-chart";

const data = [
  { source: "Direct", visitors: 1240 },
  { source: "Search", visitors: 980 },
  { source: "Social", visitors: 620 },
  { source: "Referral", visitors: 410 },
  { source: "Email", visitors: 280 },
];

export default function PieChartDefault() {
  return (
    <div className="w-full max-w-md">
      <PieChart
        data={data}
        nameKey="source"
        valueKey="visitors"
        title="Traffic Sources"
        description="Visitors by acquisition channel"
      />
    </div>
  );
}

Dependencies

More by heygaia

View all
  • Tool Calls Section

    Tool Calls Section

    501
  • Radar Chart

    Radar Chart

    81
  • Wave Spinner

    Wave Spinner

    27
  • Line Chart

    Line Chart

    20
  • Knowledge Graph

    Knowledge Graph

    18
  • Bar Chart

    Bar Chart

    18
  • Scatter Chart

    Scatter Chart

    9
  • Pricing Card

    Pricing Card

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    783
  • Analytics Dashboard

    Analytics Dashboard

    96
  • Creator Dashboard

    Creator Dashboard

    224
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    527
  • Insights Dashboard

    Insights Dashboard

    51
  • serf dashboard

    serf dashboard

    147
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    76