Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit. Nested Version

Public visualization

Bowl of fruit. Nested Version

0 stars0🌍 Public
AAlex Arobelidze
Last edited Jul 23, 2020
Created on Jul 23, 2020

A bowl of fruit shows a stateful, animated sequence of fruit on a platter. The D3.js v5 example repeatedly calls a custom `fruitBowl` component that uses a data join to add, update, and remove SVG groups and their circles and text labels. Using `scaleOrdinal` for color and radius, apples and lemons are drawn in red and yellow at different sizes. A timer alternates between popping items from the array and changing an apple to a lemon, demonstrating the enter, update, and exit transitions of the D3 selection API's `.enter().merge()`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed