d3-sankey-diagram icon indicating copy to clipboard operation
d3-sankey-diagram copied to clipboard

d3-sankey migration guide?

Open peteruithoven opened this issue 5 years ago • 3 comments

I might be missing a piece of the puzzle but I'm looking for the source of a complete example using d3-sankey-diagram. I'm mostly missing the svg creation part.

This is the source of the github page, but it's transpiled and therefore hard to read: https://github.com/ricklupton/d3-sankey-diagram/blob/gh-pages/d3-sankey-diagram.js

I'm currently coming from d3-sankey where d3.sankeyLinkHorizontal is used to extract the svg pathdata for the links. This function doesn't seem to exist when using d3-sankey-diagram.

peteruithoven avatar Jul 08 '19 13:07 peteruithoven

d3-sankey-circular for example has included the following example: https://github.com/tomshanley/d3-sankey-circular/tree/master/example

peteruithoven avatar Jul 08 '19 14:07 peteruithoven

Hi, are you looking for something like this example?

https://bl.ocks.org/ricklupton/6344d23aa6418702f120b34343dce7cb

ricklupton avatar Jul 08 '19 15:07 ricklupton

That's definitely a lot simpler and clearer. I now understand the usage example in the readme is also a almost full example, excluding just imports and the data. I ques it's just a hard adjustment coming from d3-sankey where you have to create the svg manually.

Maybe a sort of migration guide would be insightful for people? With the simple examples and re-reading the documentation it's kind of explained, but for me it was quite hard to forget these expectations I had coming from d3-sankey.

peteruithoven avatar Jul 08 '19 20:07 peteruithoven