Skip to main content
100%

Bowl of Fruit - Click to Select

✓ Published1🌍 Public
MMatthew Rubino
Last edited Jun 11, 2021
Created on Jun 11, 2021

This example demonstrates a dynamic bowl of fruit where clicking an apple or lemon selects it, highlighted by a thicker black stroke. Five apples render initially, then change over time: one is eaten, a second becomes a lemon, and another disappears. The visualization uses React with D3 v6, employing `scaleOrdinal` for color and radius, SVG transitions for smooth movement, and click handlers to update the selected fruit state.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes