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 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed