Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Bowl of Fruit - Hover to Select

Public visualization

Viewing a saved revision (read-only)

b0012ea2a7a24662b208ee2b16dbd28f

D3 Bowl of Fruit - Hover to Select

0 stars0🌍 Public
Rrdeichert
Last edited Dec 16, 2019
Created on Dec 16, 2019

A dynamic scatterplot of fruit items animates apples and lemons as circles, with hover selecting a fruit and highlighting it with a black outline. The D3 version 5 example uses the `select` and `range` functions to manage an SVG, while `scaleOrdinal` maps fruit types to colors and radii. The `fruitBowl` module handles enter, update, and exit transitions via `transition().duration(1000)`, animating circle radius and position over time. Data changes occur through timed calls that pop, mutate, push, and filter the fruit array.

AI-generated description