Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruits - hover to select

Public visualization

Bowl of fruits - hover to select

0 stars1🌍 Public
Aarieltonglet
Last edited Oct 1, 2019
Created on Sep 30, 2019

A bowl of fruits demonstrates animated enter, update, and exit transitions for SVG elements. Apples and lemons are rendered as colored circles with labels, and hovering over a fruit triggers a callback to select it, drawing a black stroke. The example uses D3.js v5 selections, data joins, and `transition()` methods to smoothly move, resize, and fade fruits as the dataset changes over time via `setTimeout`. Color and radius are mapped by fruit type using `d3.scaleOrdinal`.

AI-generated description

An example showing the capabilities of VizHub.

Comments

Sign in to join the discussion.

MIT Licensed