D3: Circle Drag Event
.attrs({})
v4 method contains multiple element attribute tuples and requireshttps://d3js.org/d3-selection-multi.v1.min.js
plugin, e.g..attrs({ width: width, height: height })
. Replacing v3’s.attr({})
.d3.scaleOrdinal(d3.schemeCategory10)
v4 method requires thed3.v4.min.js
library. D3.js categorical scales map integers to colors.- v4’s
d3.drag().on('drag', onDrag)
replaced v3’sd3.behavior.drag().on('drag', onDrag)
.
Forked v4 script above. Original v3 script below.
D3.js 3.5.17 seems to have a similar existence to Python 2.7.13. Maintained to avoid alienating v3 users.