d3 / d3-sankey

Visualize flow between nodes in a directed acyclic network.

Home Page:https://observablehq.com/collection/@d3/d3-sankey

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distribute or normalize nodes to fill available space

Spenhouet opened this issue · comments

It would be nice if there would be an optional to distribute or normalize the nodes to fill the available space.

With node distribution the nodes would keep their width but would distribute to fill the parent container size.
Example for distributed nodes:
image

With node normalization the node width would be scaled so that all node widths together sum to 100%.
Example for normalized nodes:
image

This could be optionally activated for the start nodes, the end nodes and maybe even all nodes.
I think this would truly improve the design of Sankey diagrams.

I hope the idea is clear.