Skip to main content
100%

Bowl of fruits - click to select

✓ Published1🌍 Public
SSchmittYannic
Last edited Aug 17, 2020
Created on Aug 17, 2020
Forked from Bowl of fruits

This example shows a bowl of five fruits that can be clicked to select one, with a black stroke highlighting the chosen fruit and a smooth animation transitioning the selected state. The visualization updates as apples are eaten and replaced by lemons over time, demonstrating data joins in D3. Built with React and D3 v5, it uses `scaleOrdinal` for color and radius mapping, `.enter()`, `.merge()`, and `.exit()` for lifecycle handling, and `.transition().duration()` to animate circle attributes. The rendering is SVG-based, with interactive click events triggering selection callbacks.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes