Skip to main content
100%

No animation

✓ Published0🌍 Public
RRobinL
Last edited Jul 14, 2013
Created on Jul 14, 2013

The visualization demonstrates that D3.js selectors return the first matching element, so repeatedly updating a single rectangle’s x attribute only moves that one rectangle, producing no visible motion or multiple shapes. The code uses `svg.append("rect")` and a loop with `svg.select("rect").attr("x", i+10)` to attempt animation, but because the same rectangle is selected each time, the final x position is simply 110. No animation, easing, or cloning is applied, resulting in a static rectangle despite the loop.

AI-generated description

Similar vizzes