Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Click to Select

Public visualization

Bowl of Fruit - Click to Select

0 stars0🌍 Public
PPhilRG
Last edited May 15, 2020
Created on May 15, 2020

Five apples rendered as red circles sit in a row within an SVG, and clicking any of them selects it, adding a black outline. The React component uses D3’s `scaleOrdinal` for color and radius mappings, with state managed via `useState` to track the selected fruit. Rendering is direct SVG circle generation, driven by the `FruitBowl` component. The code includes commented-out D3 transitions for potential future animation.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed