Skip to content

Getting Started

chartjs-chart-sankey is a Chart.js extension for rendering sankey diagrams.

Terminal window
npm install chart.js chartjs-chart-sankey

Register the controller and element when using the ESM package entry.

import { Chart } from 'chart.js'
import { Flow, SankeyController } from 'chartjs-chart-sankey'
Chart.register(SankeyController, Flow)
Basic sankey