Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fruit bowl to be

Public visualization

Viewing a saved revision (read-only)

310f1125e7614c9d9f611b4b158b881d

Fruit bowl to be

0 stars0🌍 Public
Wwieswies
Last edited Apr 1, 2022
Created on Apr 1, 2022

Five apples appear in a row, then one disappears after a second, and one apple turns yellow to become a lemon. The example demonstrates basic D3.js data joins with `selection.selectAll`, `enter`, and `exit` methods, using `scaleOrdinal` for color mapping. It renders SVG circles sized by a fixed radius, with transitions triggered by `setTimeout` calls that modify the underlying `fruits` array before re-rendering.

AI-generated description

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