Line Chart Example
bklit-ui/line-chart-exampleFreeExample
Composable line-chart demo for Open in v0
Install it
npx shadcn@latest add https://bklit.com/r/line-chart-example.jsonSource
1"use client"23// In your app (monorepo/npm): import { LineChart, Line, Grid, XAxis, ChartTooltip } from "@bklitui/ui/charts"4import { LineChart, Line, Grid, XAxis, ChartTooltip } from "@/components/charts"56import { curveNatural } from "@visx/curve";78const chartData = [9 { date: new Date("2024-01-01"), users: 1200 },10 { date: new Date("2024-02-01"), users: 1350 },11 { date: new Date("2024-03-01"), users: 1100 },12 { date: new Date("2024-04-01"), users: 1450 },13 { date: new Date("2024-05-01"), users: 1380 },14 { date: new Date("2024-06-01"), users: 1520 },15];1617export default function Component() {18 return (19 <main className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">20 <div className="w-full max-w-3xl">21 <LineChart data={chartData}>22 <Grid horizontal />23 <Line dataKey="users" curve={curveNatural} stroke="var(--chart-line-primary)" />24 <XAxis />25 <ChartTooltip />26</LineChart>27 </div>28 </main>29 )30}
What it pulls in
npm packages
Other registry items
Files it writes
More from bklit-ui
All 56 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Area Chart Examplearea-chart-example | bklit-ui | Examples | Free | 3 deps · 2 files | |
| Bar Chart Examplebar-chart-example | bklit-ui | Examples | Free | 4 deps · 2 files | |
| Candlestick Chart Examplecandlestick-chart-example | bklit-ui | Examples | Free | 2 deps · 2 files | |
| Choropleth Chart Examplechoropleth-chart-example | bklit-ui | Examples | Free | 3 deps · 2 files | |
| Composed Chart Examplecomposed-chart-example | bklit-ui | Examples | Free | 3 deps · 2 files | |
| Funnel Chart Examplefunnel-chart-example | bklit-ui | Examples | Free | 2 deps · 2 files | |
| Gauge Chart Examplegauge-chart-example | bklit-ui | Examples | Free | 2 deps · 2 files | |
| Heatmap Chart Exampleheatmap-chart-example | bklit-ui | Examples | Free | 3 deps · 2 files |
