--cięcie--
function update(data) {
  d3
    .select("svg")
    .selectAll("circle")
    .data(data, d => d)
    .join(
      enter => enter
        .append("circle")
        .attr("cx", (d, i) => (i + 1) * 50)
        .attr("cy", 50)
        .transition()
        .duration(500)
        .attr("r", (d, i) => d * 5),
      update => update
        .transition()
        .duration(500)
        .attr("cx", (d, i) => (i + 1) * 50),
      exit => exit
        .transition()
        .duration(500)
        .attr("r", 0)
        .remove()
    );
}

update(numbers); 
--cięcie--
