I know a lot of people have trouble zooming and panning d3. Indeed, I found myself in a situation where I had a simple bar chart to which I wanted to add the zoom behavior, and also make the full chart draggable. I saw several extremely complex examples of d3 charts with zooming and panning, and thought that there must be an easier way, particularly if you don't need to scale the x and y axes. There is, and here is is in CoffeeScript:
vis.call(d3.behavior.zoom()
.on("zoom", ->
g.attr("transform", "translate(" + d3.event.translate[0] + "," + d3.event.translate[1] + ") scale(" + d3.event.scale + ")")
)
)