All examples By author By category About

johanneseckert

Sankey Diagram with auto links

This is a fork of timelyportfolio's sankey with data from a csv source

I modified the sankey plugin to allow »auto« nodes that will inherit the value from the connecting node and use that as it's weight. This is great to create sankeys where only parts of the data is defined, while other streams compute automatically. Only the first column has real numbers, the other two sides are computed automatically (all links center and right inherit their values from their source).

see sankey.js #100 computeNodeValues()

This is probably a very rough way of doing it, but it works for my data (needed to group the nodes into a third category). This does not work if an auto link is made behind an auto node, as this will duplicate the output.

Thanks to d3noob.org and timelyportfolio