Skip to main content
100%

Fork of Fade Out Fade In 2

✓ Published0🌍 Public
SSteven
Last edited Nov 27, 2021
Created on Nov 27, 2021
Forked from Fade Out Fade In 2

This example shows two sequential sets of circles. First, two blue circles appear briefly; after two seconds, they fade out and are removed. Then, four red circles fade in, each placed at new coordinates. The visualization uses D3 v7 with SVG and animation. The code demonstrates a common D3 pattern where the `transition()` method applies a fade-out effect, followed by a `.delay(2000)` before the new selection fades in. The author notes the timing issue: the new selection is created before the first circles are fully removed, resulting in only two red circles appearing instead of four.

AI-generated description

Fade Out Fade In 2

Trying to figure out how to remove elements and then make a new selection. There should be four red circles, not two. The new selection is being made before the first elements are removed.

(Connected with d3 Slack question)

MIT Licensed

Similar vizzes