1var svg = d3.select("body")
2 .append("svg")
3 .attr("width", "100%")
4 .attr("height", "100%")
5 .call(d3.behavior.zoom().on("zoom", function () {
6 svg.attr("transform", "translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")")
7 }))
8 .append("g")