Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Bowl of fruit - Click to Select D3.js!

Public visualization

Viewing a saved revision (read-only)

305977696d9147b8b737219f9c347fe3

Fork of Fork of Bowl of fruit - Click to Select D3.js!

0 stars1🌍 Public
CCarloWK1202
Last edited Jul 28, 2022
Created on Jul 13, 2022

Five circles render as apples and lemons in an SVG bowl, with clicks selecting a fruit by highlighting its black stroke. D3.js v5’s `scaleOrdinal` maps fruit types to colors and radii, while `transition().duration(1000)` animates circle entry, exit, and resizing. The `fruitBowl` module uses data joins, `on('click')` handlers, and timed `setTimeout` calls to dynamically add, remove, or mutate fruit data, triggering re-renders.

AI-generated description