d3-plugins
d3-plugins copied to clipboard
sankey: fix nodesByBreadth to have proper ordering
d3.nest().key() converts all keys into strings. d3.ascending does not coerce strings into numbers for comparison -- do it ourselves.
This improves relaxation efficiency. Before, it could traverse levels in the wrong order, taking longer to propagate values up.