Has anyone ever encountered the following problem.
Say you have a
> dataset = [1,2,3,4]
and your draw function, that "animates" the removal of data points from the dataset with a delay of 1000:
> function drawScatterplot() {
> circles = svg.select("circle").data(dataset)
> circles.enter() //Logic for enter...
> circles.exit().transition.delay(1000).attr("r", 0).remove()
now I run a callbck function, with a delay LESS than 1000, say 200:
> setInterval( function(){ dataset.splice(0,1); drawScatterplot();}, 200 );
Now, my "exit" animation never finishes. It only does 200 ms worth of animation, and then stops there (because setInterval calls the "exit" condition again!)
What am I doing wrong?
Any help appreciated.