rect {fill:none; pointer-events:all;}
circle {fill:none; stroke-width:2px;}</style>
style='background-color:silver; width:600px; height:300px'>
var width=600, height=300, i=0;
var svg=d3.select('#mouse_events');
.attr('width',width).attr('height',height)
.on('ontouchstart' in document ?
'touchmove':'mousemove',draw);
svg.insert('circle','rect')
.attr('cx',m[0]).attr('cy',m[1]).attr('r',1e-6)
.style('stroke',d3.hsl((i=(i+1)%360),1,.5))
.style('stroke-opacity',1)
.transition().duration(2000)
.ease(Math.sqrt).attr('r',10)
.style('stroke-opacity',1e-6)
d3.event.preventDefault();};