Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

bowl of fruit - general update with text and layers

Public visualization

bowl of fruit - general update with text and layers

0 stars0🌍 Public
BBrett
Last edited Jul 16, 2019
Created on Jul 15, 2019

A bowl of fruit demonstrates D3's general update pattern, animating a row of apples and lemons within a blue bowl shape. Circles shrink and disappear, a lemon replaces an apple in place, and remaining fruits shift positions across three timed updates. The code uses `selection.data()`, `merge()`, and `exit()` with `transition().duration()` to coordinate enter, update, and exit layers for both circle radii and text labels. An ordinal color scale maps fruit types to red and yellow fills.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed