Area Chart Example
bklit-ui/area-chart-exampleFreeExample
Composable area-chart demo for Open in v0
Install it
npx shadcn@latest add https://bklit.com/r/area-chart-example.jsonSource
1"use client"23// In your app (monorepo/npm): import { AreaChart, Area, Grid, XAxis, ChartTooltip } from "@bklitui/ui/charts"4import { AreaChart, Area, Grid, XAxis, ChartTooltip } from "@/components/charts"56import { curveNatural } from "@visx/curve";78const chartData = [9 { date: new Date("2024-01-01"), desktop: 186 },10 { date: new Date("2024-02-01"), desktop: 305 },11 { date: new Date("2024-03-01"), desktop: 237 },12 { date: new Date("2024-04-01"), desktop: 73 },13 { date: new Date("2024-05-01"), desktop: 209 },14 { date: new Date("2024-06-01"), desktop: 214 },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 <AreaChart data={chartData} animationDuration={1100}>22 <Grid horizontal />23 <Area dataKey="desktop" curve={curveNatural} strokeWidth={2.5} fillOpacity={0.4} />24 <XAxis />25 <ChartTooltip />26</AreaChart>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 |
|---|---|---|---|---|---|
| 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 | |
| Line Chart Exampleline-chart-example | bklit-ui | Examples | Free | 3 deps · 2 files |
