d3-sankey-diagram
d3-sankey-diagram copied to clipboard
d3-sankey migration guide?
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
.
d3-sankey-circular for example has included the following example: https://github.com/tomshanley/d3-sankey-circular/tree/master/example
Hi, are you looking for something like this example?
https://bl.ocks.org/ricklupton/6344d23aa6418702f120b34343dce7cb
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.