Skip to content

Instantly share code, notes, and snippets.

@emeeks
emeeks / d3.sankey.js
Last active December 31, 2021 13:45
Sankey Particles
d3.sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
nodes = [],
links = [];
sankey.nodeWidth = function(_) {
if (!arguments.length) return nodeWidth;