Skip to main content
100%

Blow of fruit - Hover to select

✓ Published0🌍 Public
PPotikorn
Last edited Feb 18, 2020
Created on Feb 18, 2020

A hovering mouse selects individual fruit in a D3.js animated bowl, highlighting the chosen item with a black outline. The visualization demonstrates data joining and DOM manipulation: fruit enter, update, and exit as the dataset changes over time, with apples and lemons rendered as colored circles. D3 scales map fruit types to colors and radii, while transitions animate size and fill changes. The code uses `selection.data()`, `selection.enter()`, `selection.merge()`, `selection.exit()`, and `transition().duration()` to manage the five fruit elements in an SVG.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes