d3.event is null in a ReactJS + d3JS component

前端 未结 5 1168
北恋
北恋 2020-12-17 20:22

I\'m using ReactJS, d3JS and ES6 to create an org chart. I can create the chart and see it. But I want to add the zoom behavior to the chart, so I used

5条回答
  •  情书的邮戳
    2020-12-17 20:59

    Did you try importing d3 like this instead : import d3 from 'd3';

    This issue seems to occur when two occurences of d3 exist in the document.

提交回复
热议问题