Reputation: 4479
I have a D3 BubbleChart where I am trying to get the exit selection of the text in the bubbles to delay removal with the following code; but the delay seems to have no effect... The visualization form the below code behaves identical to it with the delay( 1 ) removed; changing the time parameter to delay anything else does not change the behavior either.
All other transitions in my Bubblechart work as expected.
Any ideas how I could get the delay working? Thanks!
// ... Exit data [from existing g elements], transitioning to 0-radius
gDataJoin.exit().selectAll( "text" ).transition().delay( 1 ).remove();
gDataJoin.exit().selectAll( "circle" ).transition().duration( transitionTime ).attr( "r", 0 );
gDataJoin.exit().transition().delay( transitionTime ).remove();
Upvotes: 0
Views: 1010
Reputation: 8150
delay(1)
is the same as delay
1 millisecond. So it's working -- for a millisecond.
Change to:
gDataJoin.exit().selectAll( "text" ).transition().delay( 1000 ).remove();
gDataJoin.exit().selectAll( "circle" ).transition().duration( transitionTime ).attr( "r", 0 );
gDataJoin.exit().transition().delay( transitionTime ).remove();
Upvotes: 1