Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var data = [{"x": 100, "y": 110}, {"x": 200, "y": 201}];
- var data2 = [{"x": 150, "y": 150}, {"x": 210, "y": 202}];
- var svg = d3.select("svg");
- svg.selectAll("circle")
- .data(data)
- .enter().append("circle")
- .attr("cx", function(d) { return d.x; })
- .attr("cy", function(d) { return d.y; })
- .transition()
- .attr("r", function(d){ return 51;});
- setTimeout(function(){
- svg.selectAll("circle")
- .data(data2)
- .transition()
- .attr("cx", function(d) { return d.x; })
- .attr("cy", function(d) { return d.y; });
- ;
- },1000)
- // function(){ return 51;}
Add Comment
Please, Sign In to add comment