Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit-interaction

Public visualization

Bowl of Fruit-interaction

0 stars1🌍 Public
SSagar Malviya
Last edited Jun 2, 2019
Created on Jun 2, 2019

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 description

Comments

Sign in to join the discussion.

MIT Licensed