d3 sankey charts – manually position node along x axis
This is possible. See this JSFiddle. The computeNodeBreadths function in sankey.js can be modified to look for an explicit x-position that has been assigned to a node (node.xPos): function computeNodeBreadths() { var remainingNodes = nodes, nextNodes, x = 0; while (remainingNodes.length) { nextNodes = []; remainingNodes.forEach(function(node) { if (node.xPos) node.x = node.xPos; else node.x = … Read more