Closed nowthis closed 2 years ago
(Renamed this to be slightly clearer.)
The Sankey library currently always places all nodes with no predecessors ("origins") at the far left, and places all nodes without any targets ("endpoints") all the way to the right.
This doesn't actually have to happen; the algorithm does know exactly how far to the right or left a node has to be to fit in the diagram coherently.
This feature would add an on/off control for each type (origins & endpoints), letting users decide if they want the current behavior OR if they want to place nodes only as far left (and as far right) as they actually need to be to correctly represent the data.
Planning to do this feature next.
+1 for this feature. This seems like one way for this to work: https://github.com/d3/d3-sankey#sankeyCenter
(This feature was added in 2018 on the actual sankeymatic website but not checked in. I'll be resolving that missing piece and closing this soon.)
The Sankey library used here lets us choose:
Give the user easy access to these controls.