SANKEY Experiment
✓ Published0🌍 Public
Dd3noob
Last edited Jun 19, 2021
Created on Jun 19, 2021
This example uses a Sankey diagram to visualize the flow of values between five nodes, with links showing the quantity transferred from each source to its targets. The diagram is rendered as an SVG using d3.v7 and the d3-sankey plugin v0.12.3, with node rectangles colored using d3.scaleOrdinal and d3.schemeCategory10. Link thickness encodes the flow value, and hovering highlights the links. Data is loaded from a static JSON file (sankey.json) containing the node and link definitions.
AI-generated descriptionThe above example is intended to demonstrate drawing a simple Sankey diagram using v7 of d3.js. It uses the 0.12.3 version of the Sankey plugin.
This is one of the code samples for the update to the book D3 Tips and Tricks to version 7 of d3.js.
mit Licensed