🌍 Public
Bowl of Fruit-interaction
A small set of fruit circles sits in a bowl, highlighting an active fruit with a black stroke when clicked. The code uses d3 data joins to update the scene, removing a fruit, replacing one apple with a lemon, and re-rendering at timed intervals. The fruitBowl function applies d3 scaleOrdinal for color and radius, and SVG groups translate each circle and label into position. Click events trigger a state update that re-renders with the new selection highlighted.
AI-generated descriptionMIT Licensed








Comments
Sign in to join the discussion.