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

0 stars4🌍 Public
SShuyu Zheng
Last edited Jan 24, 2021
Created on Jan 12, 2021

A bowl of fruit demonstrates the general update pattern, showing five apples that enter, change, and exit over time. The visualization uses D3 v6's `scaleOrdinal` for color and radius mappings, with `transition` animations that grow entering circles from zero radius, fade exiting ones back to zero, and smoothly update attributes for persistent items. The code applies the pattern through `selectAll`, `enter`, `merge`, and `exit` methods, driven by `setTimeout` calls that pop, replace, and filter the fruit array.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed