SANKEY Experiment
This example shows a Sankey diagram with seven nodes and ten links, each link carrying a value of two widgets. The diagram uses the D3 v4 library with Jason Davies' Sankey plugin to compute node positions and render SVG paths for the links, which are colored black with adjustable opacity. Users can drag node rectangles to reposition them, triggering a relayout of the flow. The data comes from a local JSON file specifying the node names and link connections, and node colors are assigned via `d3.scaleOrdinal` with the `d3.schemeCategory20` palette.
AI-generated descriptionThe above example is intended to demonstrate drawing a simple Sankey diagram using v4 of d3.js. It uses Jason Davies' version of the Sankey plugin.
This is one of the code samples for the update to the book D3 Tips and Tricks to version 4 of d3.js.
forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/013054e8d7807dff76247b81b0e29030'>Sankey Diagram with v4</a>