This is the code for Chapter 12, Figure 4 from D3.js in Action which requires a touch interface (or emulator) to see any effect. This example implements single-finger panning by storing the initial position of a touch from d3.touches() and adjusting the SVG g element's transform attribute based on the current position of the touch.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js