Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern

Public visualization

Bowl of Fruit - General Update Pattern

2 stars35🌍 Public
CCurran Kelleher
Last edited Dec 27, 2019
Created on Sep 8, 2018
Forked from Making a Bar Chart

Five circles are drawn as apples in a bowl, each at a fixed horizontal position. The visualization demonstrates the general update pattern: initially five apples appear, then the last is removed, the third apple changes into a lemon, and the second item is deleted. Using D3 v5’s `selectAll`, `data`, `enter`, `merge`, and `exit` methods within the custom `fruitBowl` function, the SVG circles transition smoothly. Ordinal color and radius scales map fruit types to specific colors and sizes, with data defined in `index.js`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed