Skip to main content
100%

Bowl of Fruits - Nested elements

✓ Published0🌍 Public
YYasara Peiris
Last edited Jul 22, 2020
Created on Jul 22, 2020
Forked from Bowl of Fruits

A bowl of fruits demonstrates nested SVG elements and data joins in D3.js v5. Rectangular bowls hold circular fruits, with apples and lemons distinguished by color and size through d3.scaleOrdinal scales. The visualization updates over time as fruits are removed and types change, showing enter, update, and exit selections. The code uses d3.select and selection methods like .merge() and .exit().remove() to manage dynamic rendering, with text labels positioned below each fruit.

AI-generated description

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

MIT Licensed

Similar vizzes