May 2019
Beginner to intermediate
650 pages
14h 50m
English
You can create a Sankey diagram using the d3-sankey module, which is not part of the default bundle. That means you have to import the module separately. If you use NPM, run:
npm install d3-sankey
You can also import it directly to an HTML page using the <script> tag and the library's CDN URL:
<script src="https://unpkg.com/d3-sankey"></script>
A Sankey layout function requires a node-link data structure, which consists of two datasets: one containing a list of nodes, and a second one containing an adjacency list of link objects identifying the source and target nodes for each link. If your data is in another format you will have to convert it (see the JavaScript/dvj-all.js file for conversion functions). The Sankey ...
Read now
Unlock full access