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
If you're using React, Babel or Webpack and d3.js v4, it looks like you need to import event
from d3-selection in order to use d3.event
import * as d3 from 'd3';
import {event as currentEvent} from 'd3-selection';
You can now use currentEvent
the same way you'd use d3.event
. See https://github.com/d3/d3/issues/2733 for more information.