Skip to main content
100%

About fruits

✓ Published1🌍 Public
WWhitney Hung
Last edited Jun 3, 2020
Created on May 28, 2020

This example shows how a data join animates changes to a fruit bowl. Five apples are initially rendered as circles, then one is removed, another transforms into a lemon, and a third is eaten, all with smooth transitions. Using D3's `select`, `range`, and `scaleOrdinal`, the `fruitBowl` function manages circle enter, update, and exit states via `.transition().duration(1000)`, animating radius and position. The SVG output is updated dynamically as JavaScript timeouts trigger the re-rendering.

AI-generated description
MIT Licensed

Similar vizzes