Skip to main content
100%

SANKEY Experiment

✓ Published0🌍 Public
Dd3noob
Last edited Sep 5, 2016
Created on Sep 5, 2016

This example shows a Sankey diagram with five nodes and seven links, where the width of each link is proportional to its value, and nodes can be dragged to rearrange the flow. The visualization is built using D3 v4 and the `d3.sankey()` plugin, which handles node layout and link computation, while the SVG rendering uses `d3.select()` to append paths and rectangles. The code uses `d3.drag()` for interactive node movement, and the data is loaded from a JSON file with `d3.json()`.

AI-generated description

The 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.

Similar vizzes