Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of bowl of fruit

Public visualization

Fork of bowl of fruit

0 stars0🌍 Public
Jjlspangl
Last edited Aug 30, 2021
Created on Aug 30, 2021
Forked from bowl of fruit

This example demonstrates D3.js data joins by rendering a bowl of fruit as SVG circles that update over time. A row of five apples initially appears, then one apple is removed, and another is replaced with a lemon, triggering enter, update, and exit selections. The `render` function uses `selection.selectAll('circle')`, `.data()`, `.merge()`, and `.exit().remove()` to handle dynamic changes, with `scaleOrdinal` mapping fruit types to colors and radii.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed