All examples By author By category About

lorenzopub

Sankey from CSV III

Create a Sankey diagram from a CSV file. I got most of this code from d3noob's block, but I added the code to convert the CSV data into the format required by d3-sankey.

In this version, the links are colored as a linear gradient, transitioning from the color of the source to that of the target. In version 1, the links were not colored. In version 2, the links were colored according to this source.

My verdict: A single color is the easiest to read.

forked from HarryStevens's block: Sankey from CSV III