Skip to main content
100%

Bowl of Fruit - Nested General Update Pattern

✓ Published2🌍 Public
NNico Donovan
Last edited Jul 14, 2020
Created on Jul 14, 2020

This example demonstrates the nested general update pattern for data joins in D3. A bowl of fruit is rendered as SVG circles and text labels, with apples and lemons distinguished by color and size using `scaleOrdinal`. The visualization updates over time: removing a fruit, changing an apple to a lemon, and filtering out another fruit. The code uses `selection.data`, `enter`, `merge`, and `exit` to handle updates, with `fruitBowl` managing both top-level groups and nested circle/text elements. Changes occur at one-second intervals.

AI-generated description
MIT Licensed

Similar vizzes