Hello! Guys, help with the problem. There is a CSV file with fields: object_name, seconds, x_coordinate, y_coordinate. It is necessary to make an animation on svg / d3. Displays the movement of objects (circles) depending on time (seconds) and coordinates X, Y. At one time on the canvas can be several objects, or disappear and appear new (depending on time). I did not find examples of cycles for d3 or svg on the Internet. I will be glad to any help.

d3.csv("Animation.csv",type, function(error, data) { var svg = d3.select("body") .append("svg") .attr("width", 200) .attr("height", 200); for (var i = 1; i < data.length; i++) { svg.selectAll("circle") .data(data) .enter().append("circle") .attr("cx", function(d) { return d.xcoord; }) .attr("cy", function(d) { return d.ycoord; }) .attr("r", 2.5); } }); function type(d) { d.seconds = +d.seconds; d.xcoord = +d.xcoord; d.ycoord = +d.ycoord; return d; } 

enter image description here

    0