Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/line-chart.json
Usage
import { LineChart } from "@/components/ui/line-chart";<LineChart
data={[
{ label: "Jan", value: 30 },
{ label: "Feb", value: 45 },
{ label: "Mar", value: 28 },
]}
width={40}
height={10}
title="Monthly Sales"
/>API Reference
LineChart
| Prop | Type | Default |
|---|---|---|
data | (number | { label?: string; value: number })[] | required |
width | number | 40 |
height | number | 10 |
title | string | undefined |
color | string | undefined |
showAxes | boolean | true |