chart3 = {
let el = this
if (!el) {
el = DOM.svg(600, 100)
el.circles = d3.select(el).selectAll("circle")
.data(data)
el.circles.enter().append("circle")
.attr("cy", 50 )
.attr("cx", (d,i) => (i*50 + 100))
.attr("fill", "brown")
.attr("r", 0 )
.transition().duration(2000)
.attr("r", d => d * 5 )
console.log(el.circles)
}
console.log("updating...")
el.circles = d3.select(el).selectAll("circles")
.data(data)
el.circles.enter().append("circle")
.attr("cy", 50 )
.attr("cx", (d,i) => (i*50 + 100))
.attr("fill", "black")
.attr("r", 0 )
.transition().duration(2000)
.attr("r", d => d * 5 )
el.circles.exit().remove
console.log(el.circles)
return el
}