d3 / d3-sankey

Visualize flow between nodes in a directed acyclic network.
https://observablehq.com/collection/@d3/d3-sankey
BSD 3-Clause "New" or "Revised" License
820 stars 255 forks source link

Support cycles. #1

Open elmart opened 8 years ago

elmart commented 8 years ago

Hi, I searched for sankey cycles support and found some issues debating this some time ago. Among approaches with some working code, perhaps https://github.com/soxofaan/d3-plugin-captain-sankey seems the most interesting. It seems his author expected it to be subsumed into an official d3 repo (which I presume would be this one) at some point. But it's not clear to me what has happened since.

What's the status of this? Thanks.

ghost commented 8 years ago

Hi Eliseo,

As you yourself have noted in this issue the project seems to be mostly inactive, which the author has confirmed in another issue.

The author has not contacted either me or Mike Bostock to my knowledge, so I'm not sure about whether it was their intention to merge their changes into this repository.

However, it seems like the change you want regarding reverse-links could be implemented. I will take a closer look at this later this weekend and will keep this issue open till this is resolved. If you have further comments or suggestions, feel free to leave them here.

Thanks!

elmart commented 8 years ago

Ok, I'll wait to hear from you. Thx very much for your prompt response.

freeeve commented 8 years ago

At a minimum it would be nice if it didn't cause an infinite loop if a cycle exists. (just pretend that link doesn't exist, for example.)

jkatsnelson commented 7 years ago

I just ran into this issue while using d3-sankey :(

mbostock commented 5 years ago

As of version 0.9.1 (ef0ca636b8e256a46dcab37213d0cd3913013fa4), we throw an error rather than going into an infinite loop.

peteruithoven commented 5 years ago

There are two alternatives that do support circulair links: