retroui

Line Chart

Dashboards

About

A retro-styled line chart for visualizing trends and data over time, with configurable grid, tooltip, and multi-line support built on Recharts.

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

Code

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

Usage.tsx

import LineChart from "@/components/ui/line-chart";

const data = [
  { month: "Jan", revenue: 186, expenses: 120 },
  { month: "Feb", revenue: 205, expenses: 140 },
  { month: "Mar", revenue: 237, expenses: 160 },
  { month: "Apr", revenue: 273, expenses: 150 },
  { month: "May", revenue: 309, expenses: 190 },
  { month: "Jun", revenue: 350, expenses: 210 },
];

export default function LineChartDemo() {
  return (
    <div className="w-full max-w-2xl p-6 border rounded-lg bg-background">
      <h3 className="text-lg font-bold mb-1">Revenue vs Expenses</h3>
      <p className="text-sm text-muted-foreground mb-4">January - June 2024</p>
      <LineChart
        data={data}
        index="month"
        categories={["revenue", "expenses"]}
        strokeColors={["#2563eb", "#f97316"]}
        valueFormatter={(value) => `$${value}`}
      />
    </div>
  );
}

Dependencies

More by retroui

View all
  • Menu

    Menu

    22
  • Table

    Table

    12
  • Area Chart

    Area Chart

    9
  • Popover

    Popover

    8
  • Bar Chart

    Bar Chart

    1
  • Badge

    Badge

  • Tooltip

    Tooltip

  • Toggle Group

    Toggle Group

More in Dashboards

View all
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.4K
  • Sidebar

    Sidebar

    234
  • SaaS Template

    SaaS Template

    2.4K
  • Stats Bento

    Stats Bento

    1.1K
  • Financial Bento Grid

    Financial Bento Grid

    71
  • Stats cards with links

    Stats cards with links

    33
  • Course Design Cards

    Course Design Cards

    1.1K
  • Chat template

    Chat template

    598