D3: elementi da array di oggetti

    let svg = d3.select("body").append("svg")
            .attr("width",600).attr("height",200)

let circlesCoord = [
  { x: 100, y: 50 },
  { x: 275, y: 150 },
  { x: 450, y: 85 }
];

svg.selectAll("circle")
   .data(circlesCoord)
   .join("circle")
   .attr("cx", d => d.x)
   .attr("cy", d => d.y)
   .attr("r", 20)
  

  

  

Aggiungere le coordinate di altri cerchi all’array circlesCoord.