This example demonstrates applying d3.drag for dragging circles in SVG. Each circle’s datum is an object with x
and y
properties. The data and the circle element’s position are updated during the drag event. The circle is raised to the foreground at the start of a drag, and a temporary stroke is applied during drag for visual feedback.
Compare this to dragging Canvas circles. Selection can be improved using a Voronoi overlay.
https://d3js.org/d3.v4.min.js