Skip to main content
100%

Bowl of fruits- Animated Transition

✓ Published3🌍 Public
KKazushige Okuma
Last edited Oct 15, 2019
Created on Sep 22, 2019
Forked from Making a Barchart

A bowl of fruits demonstrates animated transitions between data-bound SVG circles, using D3 v5 data joins and enter/update/exit patterns. Fruits (apples and lemons) are sized and colored with ordinal scales, and each state change—removing, replacing, or filtering fruit—triggers a one-second `transition` on circle radii and positions. The code imports `scaleOrdinal` and `select` from D3, and explicitly uses `.data()` with key functions, `merge()`, and `transition().duration()` to smooth updates. Population data appears in the CSV but is not used by the visualization, which relies solely on generated fruit objects.

AI-generated description
MIT Licensed

Similar vizzes