Skip to main content
100%

HW Bowl of Fruit - General Update Pattern Special Cases

✓ Published0🌍 Public
YYF
Last edited Oct 30, 2018
Created on Sep 18, 2018

This example demonstrates the d3 general update pattern’s special cases, using a bowl of fruit to show what happens when data entries are removed, replaced, or reordered. Animated transitions shrink and fade out exiting circles and text, while entering elements are drawn at their new positions. The code relies on d3’s `select`, `scaleOrdinal`, and `transition` APIs, with SVG rendering and pre-set timeouts driving the sequence. The fruit types are encoded by color and radius, with text labels showing type names, all within a static bowl-shaped rectangle.

AI-generated description
MIT Licensed

Similar vizzes