Skip to main content
100%

Bowl of Fruit - Nested

✓ Published1🌍 Public
CChristine Lanser
Last edited Oct 6, 2020
Created on Oct 3, 2020

A nested selection pattern updates a bowl of fruit rendered as SVG circles and text labels. The visualization starts with five apples, then sequentially removes one fruit, swaps an apple for a lemon, and filters out another apple. D3’s `scaleOrdinal` maps fruit types to colors and radii, while `selection.enter` and `selection.merge` manage entering and updating elements. The code uses `d3.select`, `d3.range`, and generic SVG `circle` and `text` elements.

AI-generated description
MIT Licensed

Similar vizzes