Getting Started
chartjs-chart-sankey is a Chart.js extension for rendering sankey diagrams.
Installation
Section titled “Installation”npm install chart.js chartjs-chart-sankeyBasic Usage
Section titled “Basic Usage”Register the controller and the elements when using the ESM package entry. NodeElement is the element of a node; a chart also works when only the controller and Flow are registered.
import { Chart } from 'chart.js'import { Flow, NodeElement, SankeyController } from 'chartjs-chart-sankey'
Chart.register(SankeyController, Flow, NodeElement)Continue with the editable basic Sankey sample.