I searched the same thing and I found this post .
You can write something like the following:
var svg = outer.append("svg:g") .call(d3.behavior.zoom() .on("zoom", rescale) .on("zoomstart", zoomStart) .on("zoomend", zoomEnd)) .on("dblclick.zoom", null) .append("svg:g"); function zoomStart(){ console.log("ZOOM START"); } function zoomEnd(){ console.log("ZOOM END"); }
Hope this helps.
source share