block by d3noob 47dfa7f736a3bd42c4425e37dcf9884a

Sankey using named nodes in v6

Full Screen

The above example is intended to demonstrate drawing a simple Sankey diagram using JSON with names for the nodes instead of relying on d3 to index them.

This is one of the code samples for the update to the book D3 Tips and Tricks to version 6 of d3.js.

index.html

sankey-names.json

sankey.js