n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 179 forks source link

Make it more obvious n3-charts/line-chart doesn't work with D3 v4.* #516

Closed arfordweb closed 7 years ago

arfordweb commented 8 years ago

Ouch. I just spent way too long trying to figure out why I was getting the error:

angular.min.js:108 TypeError: Cannot read property 'apply' of undefined at EventManager.trigger At LineChart.js:718:38

Turns out I was using D3 version 4 rather than the latest version 3, per this Issue from a month ago: https://github.com/n3-charts/line-chart/issues/513

Could you guys update the documentation and README to make it more apparent that this plugin isn't compatible with version 4 of D3 yet? I'm sure it will save future adopters of your plugin a great deal of heartache.

Thanks.

lorem--ipsum commented 8 years ago

Good idea ! Thanks :)

stowball commented 8 years ago

I just wasted 30 minutes on this, too.

Any plans for v4 support?

sitawit commented 7 years ago

I think the preferable solution is to change package.json to be more specific. For example, using D3: 3.5.17 (latest of 3.x) instead of ^3.5.5.

arfordweb commented 7 years ago

@sitawit It is. My suggestion is to make it more obvious in the docs that you'll have to do this rather than attempting to use v4. That would be a short-term solution anyways.

arfordweb commented 7 years ago

And it looks like that was done. It's now at the top of the doc. Thanks!