plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
17.08k stars 1.87k forks source link

Distorted link loop in sankey diagram #7132

Open mateo-forjan opened 2 months ago

mateo-forjan commented 2 months ago

Hi, Hi, I figured out that in Sankey diagram in some cases where the link should be a loop, e.g. link from Node 4 to Node 1 in (https://codepen.io/mateo-forjan/pen/BagVGEx), that loop becomes distorted if you move the Node 4 to the left of the Node 1, as in (https://codepen.io/mateo-forjan/pen/wvLXQNj). Distortion makes it hard to understand what's happening and gives the impression that something went wrong. I am also attaching a plotly minimal example .zip with the script and an .html file. If you open an .html file and move the node "Plenum Oxicar Out 1" to the right and "Afterburner 1/Oxicat" to the left (basically exchange their positions) you get the distorted link loop. plotly_minimal_example.zip