Skip to main content
100%

Bowl of Fruit - Click to Select

✓ Published1🌍 Public
EEllednera
Last edited Nov 10, 2020
Created on Nov 10, 2020

A bowl of five apples is rendered as SVG circles; clicking any fruit selects it with a black stroke, while the remaining fruit animate into position over one second. The example demonstrates enter, update, and exit selections with `d3.selectAll` and `transition`, using `scaleOrdinal` for color and radius by fruit type. As timers fire, apples are removed, and one apple transforms into a lemon. The `fruitBowl` function handles click events via an `onClick` callback, and `d3.v6` powers the data joins.

AI-generated description
MIT Licensed

Similar vizzes