Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[info] Compatibility with version 7 of d3js #30

Open
ntropy-esa opened this issue Oct 28, 2021 · 0 comments
Open

[info] Compatibility with version 7 of d3js #30

ntropy-esa opened this issue Oct 28, 2021 · 0 comments

Comments

@ntropy-esa
Copy link

Hello,
I managed to update the bundle d3-sankey-diagram.js to make it compatible with the version 7 of d3.js.

Main changes is that d3-collection no longer exists. See migration guide for version 6, here, still working for version 7 https://observablehq.com/@d3/d3v6-migration-guide#collection

Modified file:
d3-sankey-diagram.js.txt

Changes:

  • d3Collection.map() >>> new Map() [7 occurences]
  • d3Collection.set() >>> new Set() [3 occurences]
  • line 19250 node.ports = ports.values() >>> node.ports = ports
  • line 19251 node.ports.sort(sortPorts) >>> line removed - didn't find better fix

With these changes, that example https://bl.ocks.org/ricklupton/6344d23aa6418702f120b34343dce7cb works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant