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

compatibility with d3.js version 4? #121

Open
jebeck opened this issue Jul 5, 2016 · 7 comments
Open

compatibility with d3.js version 4? #121

jebeck opened this issue Jul 5, 2016 · 7 comments

Comments

@jebeck
Copy link

jebeck commented Jul 5, 2016

I was just trying to investigate whether d3.chart will be compatible with d3.js version 4, and I've not yet found the answer. My concern is that the change to immutable selections may have implications for d3.chart, but I'm just not sure!

First I tried creating a sample bl.ock but got this when adding d3.chart on top of the default d3 v4 distribution:
screenshot 2016-07-04 16 58 39

So then I made a local clone of d3.chart in order to comment out the version check, and I decided it'd be good to start with trying to run the tests in both versions. After installing all deps, ran tests successfully with the specified npm and bower d3 v3 deps. Then installed d3 v4 via both npm and bower and tests errored out with Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue. I started digging into this a bit, and it looks like the first problem is changes in how d3 is exposed through the bower dist. I fiddled around a bit with how test/index.html is pulling in the bower dep, but couldn't get it to work within the timeframe I had for investigation.

Would love to know whether you've investigated the upgrade to d3 v4 yet or what your timeline is for doing so if not. Thanks!

@jgalb
Copy link

jgalb commented Jul 5, 2016

I have been working in my spare time on a v4 retro-fit and currently have it passing 75% to 80% of unit tests. I will submit a PR after I finish it for good, unless someone beats me to it.

@jebeck
Copy link
Author

jebeck commented Jul 5, 2016

Awesome @jgalb! When you have a PR, I'd be happy to test it out with our code as well, see if there are any gotchas not caught by tests, so perhaps ping me when you open it?

@jgalb
Copy link

jgalb commented Jul 5, 2016

@jebeck, absolutely, I will keep you posted.

@andreas-marschke
Copy link

@jgalb Last I looked (maybe Saturday?) d3-chart was using a simple RegEx comparison against d3.version to check if it's v3 or not and complain about it.

This could be approved upon I think.

Besides that, if you have branch/repo you work on we can help too?

@jgalb
Copy link

jgalb commented Jul 6, 2016

@andreas-marschke Yes, that is the first error you will run into trying to run d3 v4 with d3-chart. It should definitely be there since major releases (ex. 4.0.0) will most likely change how d3-chart needs to function.

With the changes to d3-selection as a whole, and addition of d3-merge, there are various changes that need to take place. d3-transition is another module that is now quite a bit different so it's behaving awkwardly.

I will push up a fork once I feel like I am headed in the correct direction. Then we can collaborate.

Thanks

@enjalot
Copy link

enjalot commented Aug 24, 2016

any progress with this @jgalb?
my guess would be the new pattern of immutable selections makes for the biggest changes.

@victor-xiong
Copy link

What's the current progress on this? I can also provide help if needed.

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

5 participants