Skip to main content
100%

Bowl of fruits - hover to select

✓ Published1🌍 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.

MIT Licensed

Similar vizzes