Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern Special Cases

Public visualization

Bowl of Fruit - General Update Pattern Special Cases

0 stars1🌍 Public
Ggmille22
Last edited Apr 21, 2020
Created on Apr 21, 2020

A bowl of fruit demonstrates D3’s general update pattern with special cases: adding five apples, removing one, changing an apple into a lemon, and deleting a middle apple. The visualization uses the D3 v5 selection methods `enter`, `merge`, and `exit` with SVG circles and text labels. The `fruitBowl` function applies ordinal scales via `d3.scaleOrdinal` for fruit color and radius, while `setTimeout` triggers each state change.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed