Sankey Chart Example
bklit-ui/sankey-chart-exampleFreeExample
Composable sankey-chart demo for Open in v0
Install it
npx shadcn@latest add https://bklit.com/r/sankey-chart-example.jsonSource
1"use client"23// In your app (monorepo/npm): import { SankeyChart, SankeyLink, SankeyNode, SankeyTooltip } from "@bklitui/ui/charts"4import { SankeyChart, SankeyLink, SankeyNode, SankeyTooltip } from "@/components/charts"56const data = {7 nodes: [8 { name: "Ads" },9 { name: "Organic" },10 { name: "Landing" },11 { name: "Product" },12 { name: "Checkout" },13 ],14 links: [15 { source: 0, target: 2, value: 40 },16 { source: 1, target: 2, value: 30 },17 { source: 2, target: 3, value: 50 },18 { source: 3, target: 4, value: 35 },19 ],20};2122export default function Component() {23 return (24 <main className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">25 <div className="w-full max-w-3xl">26 <SankeyChart data={data} aspectRatio="16 / 9">27 <SankeyLink />28 <SankeyNode />29 <SankeyTooltip />30</SankeyChart>31 </div>32 </main>33 )34}
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 |
