Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl Of Fruits

Public visualization

Bowl Of Fruits

0 stars1🌍 Public
MMahaveer Jain
Last edited Aug 28, 2021
Created on Aug 28, 2021

A bowl of fruits demonstrates data binding and animated transitions in D3.js v5. Initially five red apples appear as circles, then examples sequentially remove an apple, change one apple to a yellow lemon, and filter out another fruit. The visualization uses `selection.data()` with key functions, `enter`, `merge`, and `exit` selections, plus `transition()` to animate radius and position changes over 500 milliseconds. SVG circles and text labels are rendered with D3 scales (`scaleOrdinal`) mapping fruit types to colors and sizes.

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