Code works with d3.v2 and d3.v3, updated ReadMe.