Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit

Public visualization

Viewing a saved revision (read-only)

8058627850f24b0ab0b445a55f860d1e

Bowl of fruit

0 stars2🌍 Public
IIgor Borzunov
Last edited Aug 20, 2020
Created on Aug 14, 2020

A dynamic SVG bowl of fruit demonstrates the enter, update, and exit pattern in D3 v5. The visualization initially renders five red apples as circles with labels, then sequentially removes one apple, changes a second apple into a yellow lemon, and filters out another fruit over timed intervals. Using `scaleOrdinal` for color and radius mapping, the code applies `selection.merge` to update shared attributes and manages transitions with `attr` for x-position and radius. The example relies on `setTimeout` callbacks to trigger re-renders and shows how data joins handle dynamic changes.

AI-generated description

An example including some commonly used features of SVG.