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
SShuyu Zheng
Last edited Jan 22, 2021
Created on Jan 22, 2021

A fruit bowl visualization displays apples and lemons as colored circles. Hovering over a fruit highlights it with a black stroke, and the selection is cleared on mouseout. The code uses D3.js v6 with `scaleOrdinal` for color and radius mapping. Circle positions and radii animate via `transition().duration(1000)`, with enter and exit transitions growing or shrinking circles. The data, generated randomly, is updated through timeouts that remove or reassign fruit types, demonstrating dynamic SVG updates.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed