Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Clcik to Select

Public visualization

Bowl of Fruit - Clcik to Select

0 stars1🌍 Public
BbeauMarko
Last edited Jan 19, 2021
Created on Jan 19, 2021

This interactive example displays a bowl of fruit as colored circles that can be clicked to select. The visualization uses D3’s `scaleOrdinal` to map fruit types to colors and radii, with apples in red and lemons in yellow. State changes—removing fruit or changing an apple to a lemon—are animated over one second using D3 transitions. The React-based code employs `selectAll` to update circles and `merge` for incremental rendering, with SVG strokes indicating the selected fruit.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed