SANKEY Experiment
This interactive Sankey diagram, built with D3.js v4, visualizes the flow of "Widgets" between five nodes. Users can click and drag the rectangular nodes in both horizontal and vertical directions, which triggers a recalculation of the diagram's layout and redraws the connecting, curved links. The example leverages a Sankey plugin adapted from Jason Davies and loads its node and link data from a local JSON file, with node colors generated from a categorical color scheme.
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 particular version allows the dragging of nodes in the x and y direction. Have a play!
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/3337957c360d55c245f6057ab0866c05'>Sankey diagram with full motion nodes in v4</a>
forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/7b10f2fd637742a50363faddd6626f87'>Sankey diagram with full motion nodes in v4</a>