Skip to main content
100%

Bowl of Fruit

✓ Published2🌍 Public
Ddacoylo
Last edited Jul 2, 2020
Created on Jul 2, 2020

This example demonstrates animated updates to a bowl of fruit using D3’s data join. Circles representing apples shrink to zero when removed, while a middle apple transitions into a lemon with a new color and radius. The fruitBowl function uses `scaleOrdinal` for color and size, and `transition().duration(1000)` for smooth movements. The React-based setup renders SVG circles, with state changes triggered by `setTimeout` to eat or replace fruit.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes