🌍 Public
Viewing a saved revision (read-only)
64de81e88e9f4274acf70f34ae5eac8c
Bowl of Fruit - General Update Pattern
PPiotr Paszek
Last edited Apr 24, 2021
Created on Apr 24, 2021
Forked from Fork of Bowl of Fruit - General Update Pattern
Five apples sit in a bowl rendered as a rounded rectangle. Using the General Update Pattern, the visualization animates data-driven changes with D3's enter, update, and exit selections. `d3.scaleOrdinal` maps fruit types to colors and radii, while `selection.merge` handles state transitions. Over timed intervals, apples are removed and one is replaced with a lemon, which updates the SVG circles and text labels accordingly. The bowl's shape is a fixed SVG `rect` with large corner radii, and all rendering uses D3 v6 with SVG elements.
AI-generated description