Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit

Public visualization

Bowl of Fruit

0 stars2🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed