This is a simple example showing how you can calculate the necessary angle of rotation from a touch interaction utilizing d3.touches. The slope of the initial position of the line created from the first two touch fingertips is stored and compared to the slope of the current position of the line from those two inputs.
Notice that you need to use three fingers to signal that you're "rotating" (instead of, say, zooming or panning) even though the actual rotation calculation ignores the third fingertip.
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://d3js.org/colorbrewer.v1.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://d3js.org/colorbrewer.v1.min.js