Skip to main content
100%

Bowl of Fruit

✓ Published0🌍 Public
YYoram
Last edited Oct 16, 2020
Created on Oct 16, 2020

A bowl of fruit animates as apples and lemons are eaten and change types, with each fruit rendered as a colored circle and label inside a rounded rectangular bowl. The example uses React with D3 v5, leveraging `scaleOrdinal` for color and radius mappings, data joins to update SVG groups, and `transition().duration(1000)` to animate radius changes. The `fruitBowl` function binds fruit data to `g` elements, appending circles and text, while `setTimeout` calls trigger state changes over time.

AI-generated description

Smiley face implementation with React & D3.

MIT Licensed

Similar vizzes