Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Hover to Select

Public visualization

Bowl of Fruit - Hover to Select

0 stars0🌍 Public
Eegrebing
Last edited Sep 28, 2020
Created on Sep 28, 2020

This example demonstrates a data join with smooth SVG transitions as a bowl of fruit updates over time. Circles representing apples and lemons enter, exit, and change type, with color and radius mapped through `d3.scaleOrdinal`. Hovering highlights a fruit by updating a `selectedFruit` state, which triggers a re-render via `fruitBowl`. The code uses `selection.merge`, `transition.attr`, and mouse event listeners within a D3 v6 module.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed