I have written a script to graphically display some row-oriented data, with bars, labels and connections between rows. As the dataset has grown, the resulting SVG element ha
In d3 v4, you can use:
svg.call(zoom.transform, d3.zoomIdentity.scale(X_SCALE,Y_SCALE));
Simple example:
var zoom = d3.zoom()
.on("zoom", zoomed);
var zoomer = svg.append("rect")
.call(zoom)
.call(zoom.transform, d3.zoomIdentity.scale(2,2));
function zoomed() {
svg.attr("transform", d3.event.transform);
}
Hope that helps.