Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Animation - Bowl of Fruit - Bowl

Public visualization

Viewing a saved revision (read-only)

89cd6489586249f1b8ba31a45883d97f

D3 Animation - Bowl of Fruit - Bowl

0 stars0🌍 Public
YYoung Song
Last edited Jun 23, 2022
Created on Jun 19, 2022

This example animates a bowl of fruit as apples are eaten, replaced with lemons and watermelons, and added over time using D3’s data join with enter, update, and exit selections. Each fruit moves smoothly to a new horizontal position via `transition().duration()` and updates its color, size, and label based on a `scaleOrdinal` mapping. Rendering is done with SVG circles and text inside a rectangular bowl, driven by timers that mutate the array and re-render the scene.

AI-generated description