I am trying to implement zoom .
I have added the most basic implementation as below
var zoom = d3.zoom().on(‘zoom’, zoomed);
svg.call(zoom);
function zoomed() {
var transform = d3.event.transform;
leaf.attr(‘transform’, transform.toString());
}
When zoomed() is called by clicking on the graph I get en error that d3.event is undefined?
Not sure what I am doing wrong?
thanks,
Scott