Open bkuczenski opened 2 years ago
Note: the bug seems to be dependent on the order of the traces. The following example has the same topology but renders correctly. Very mysterious!
import plotly.graph_objects as go
nodes = {'label': ['node 0', 'node 1', 'node 2', 'node 3']}
plinks = {'source': [2, 3, 0, 0, 1], 'target': [1, 2, 2, 1, 0], 'value': [1, 1, 1, 1, 1]}
go.Figure(go.Sankey(node=nodes, link=plinks)).show()
Sankey engine fails to correctly draw certain graphs containing loops. Attached is a minimal example containing 4 nodes and 5 traces. If any trace value is set to 0, the graph renders correctly.
Tested in python on plotly 5.5.0
In the correct rendering, the trace connecting node 2 to node 0 should be straight across.
This may be related to https://github.com/plotly/plotly.py/issues/3568