Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Behaviors are not supported in d3 v4

Tags:

d3.js

Trying to upgrade d3 in my project, but error prompted: Cannot read property 'drag' of undefined It's caused by using d3.behavior.drag()

Here is the document of Behaviors for V3 https://github.com/mbostock/d3/wiki/Behaviors

But it's seems it's not supported in v4 https://github.com/mbostock/d3/tree/4

It's that API in already in roadmap, or there is some better way to implement behavior now?

like image 325
David Guan Avatar asked Jan 21 '26 12:01

David Guan


1 Answers

Answer it myself: https://github.com/mbostock/d3/issues/2461 It still on the way, will be there in a separate module.

2 April 17, Update: it supported in v4 now

like image 73
David Guan Avatar answered Jan 23 '26 06:01

David Guan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!