Skip to main content
100%

Bowl of Fruit: Object Constancy

✓ Published0🌍 Public
Bbprokopowicz
Last edited Mar 30, 2020
Created on Mar 30, 2020

Five apples appear in a row, then fade and slide in response to timed data updates that remove fruits or change an apple into a lemon, preserving each circle’s identity via a stable `id` key. The example demonstrates D3’s object constancy pattern by using `selection.data` with a key function, `enter`, `merge`, and `exit` selections, plus chained `transition` calls to animate radius and x-position over one second. Rendering uses SVG circles with d3-color scales for fill and size.

AI-generated description

D3 course follow along.

MIT Licensed

Similar vizzes