react-d3-tree icon indicating copy to clipboard operation
react-d3-tree copied to clipboard

Add support for later versions of D3

Open jeffmath opened this issue 5 years ago • 3 comments

Are you reporting a bug, or opening a feature request?

Feature request

The project I am a part of uses a later version (4.10.0) of D3 than what is required by react-d3-tree (which is 3.5.17). When I visit the page in our app that has the react-d3-tree component I've added, it breaks the other pages in the app, because react-d3-tree overwrites the global d3 variable with the older version. I need a version of react-d3-tree which supports D3 version 4.

jeffmath avatar Jul 30 '18 19:07 jeffmath

I went ahead and changed the portions of (my fork of) react-d3-tree which my project employs to use D3 V4.10.0. You can see the changes in this commit, in case you'd like to use them as a guideline.

jeffmath avatar Aug 02 '18 05:08 jeffmath

You should open a PR :)

bhgsbatista avatar Sep 10 '19 21:09 bhgsbatista

Hi @jeffmath,

Apologies that it's taken me absolutely forever to thank you for this! I'm committing to finally shipping a much improved v2 in the coming weeks, and your fork is going speed up the refactor to D3 v4.x.x a lot :)

I believe part of the issue here with global namespace conflicts being possible is also to do with how I originally decided to bundle the library for v1, which is another thing that I'm looking to address for v2.

bkrem avatar Jan 15 '20 15:01 bkrem