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

Unwanted overlap of multiple/parallel links with sankeyLinkHorizontal

stefaneidelloth opened this issue · comments

I want to create a sankey diagram where it is allowed to have multiple links between the same nodes.
Here I have two links between DE and FR (one link of value 1 and another link of value 2):

image

I would expect the neighboring links not to overlap, but they do.

=> Is that a bug of d3.sankeyLinkHorizontal ?

=> How can I ensure that the links from DE to FR run "in parallel" without overlap?

Another example for the use case of multiple/parallel links in sankey diagrams:

https://www.researchgate.net/figure/Sankey-diagram-of-material-flows-through-the-global-economy-world-and-the-EU-27-in_fig2_273459663