# Ex source link variant echarts sankey chart

A shadcn/ui block from the [@evilcharts](https://evilcharts.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/evilcharts/ex-source-link-variant-echarts-sankey-chart).

- Page, with a live preview: https://shadcn.exchange/r/evilcharts/ex-source-link-variant-echarts-sankey-chart
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/evilcharts/ex-source-link-variant-echarts-sankey-chart-light-dbb754dab381220c.png
- Registry item: https://evilcharts.com/r/ex-source-link-variant-echarts-sankey-chart.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://evilcharts.com/r/ex-source-link-variant-echarts-sankey-chart.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@evilcharts/echarts-sankey-chart`

## Files

### `src/registry/examples/echarts/ex-source-link-variant-echarts-sankey-chart.tsx`

```tsx
"use client";

import {
  EChartsSankeyChart,
  type SankeyData,
  type ChartConfig,
} from "@/registry/charts/echarts-sankey-chart";

// Data pipeline - sources through processing to destinations
const data: SankeyData = {
  nodes: [
    { name: "API" },
    { name: "Database" },
    { name: "Logs" },
    { name: "Ingestion" },
    { name: "Transform" },
    { name: "Analytics" },
    { name: "MLPipeline" },
    { name: "Dashboard" },
    { name: "Archive" },
  ],
  links: [
    { source: 0, target: 3, value: 85000 },
    { source: 1, target: 3, value: 62000 },
    { source: 2, target: 3, value: 43000 },
    { source: 3, target: 4, value: 190000 },
    { source: 4, target: 5, value: 95000 },
    { source: 4, target: 6, value: 55000 },
    { source: 4, target: 8, value: 40000 },
    { source: 5, target: 7, value: 72000 },
    { source: 5, target: 8, value: 23000 },
    { source: 6, target: 7, value: 38000 },
    { source: 6, target: 8, value: 17000 },
  ],
};

const chartConfig = {
  API: {
    label: "API Events",
    colors: {
      light: ["#0ea5e9"],
      dark: ["#38bdf8"],
    },
  },
  Database: {
    label: "Database",
    colors: {
      light: ["#8b5cf6"],
      dark: ["#a78bfa"],
    },
  },
  Logs: {
    label: "Log Files",
    colors: {
      light: ["#d97706"],
      dark: ["#fbbf24"],
    },
  },
  Ingestion: {
    label: "Ingestion Layer",
    colors: {
      light: ["#f97316"],
      dark: ["#fb923c"],
    },
  },
  Transform: {
    label: "Transform",
    colors: {
      light: ["#eab308"],
      dark: ["#facc15"],
    },
  },
  Analytics: {
    label: "Analytics",
    colors: {
      light: ["#06b6d4"],
      dark: ["#22d3ee"],
    },
  },
  MLPipeline: {
    label: "ML Pipeline",
    colors: {
      light: ["#ec4899"],
      dark: ["#f472b6"],
    },
  },
  Dashboard: {
    label: "Dashboard",
    colors: {
      light: ["#22c55e"],
      dark: ["#4ade80"],
    },
  },
  Archive: {
    label: "Archive",
    colors: {
      light: ["#be185d"],
      dark: ["#ec4899"],
    },
  },
} satisfies ChartConfig;

export function EChartsExampleSankeyChart() {
  return (
    <EChartsSankeyChart className="h-full w-full p-4" data={data} config={chartConfig}>
      <EChartsSankeyChart.Node isClickable />
      <EChartsSankeyChart.Link
        variant="source" // [!code highlight]
      />
      <EChartsSankeyChart.Tooltip />
    </EChartsSankeyChart>
  );
}
```
