block by emeeks 4977005361f8cdada5d0

Ch. 12, Fig. 4 - D3.js in Action

Full Screen

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.

index.html