🏠 back to Observable

Scaling Sankey nodes and links to balance small nodes

I am building a Sankey diagram with many nodes, unfortunately the data has a few extreme points where some nodes have a value of 100000+ and some have a value of 10.

I have tried to map the data so that the the minimum height of each node would be higher(also applying the map on the link), but this results in miss-alignment between the ode and the link.

I believe d3.sankeyLinkHorizontal() which draws the path does not get the mapping function.

Is there a better way to have a minimum height on a node?

Appreciate the help on this,