Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bowl of fruit

Public visualization

Viewing a saved revision (read-only)

4ac4957e18cd4e7e8bd4686584010043

Making a bowl of fruit

0 stars0🌍 Public
NNoWizards
Last edited Mar 10, 2020
Created on Mar 10, 2020

Five apples appear in a row, then one exits and another becomes a lemon. This D3.js example demonstrates the general update pattern through chained `selection.join` methods without using `join`, instead applying `enter`, `merge`, and `exit` to handle data changes. It uses `scaleOrdinal` for fruit colors and radii, and `setTimeout` to trigger pop and type-change mutations. The SVG circles are positioned with fixed `cx` values and a static `cy`, with the exiting fruit turning black before removal.

AI-generated description

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