Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit

Public visualization

Viewing a saved revision (read-only)

834260ff58c64d2b9498a4d7cb40ce39

Bowl of fruit

0 stars1🌍 Public
Aandy-yc-lin
Last edited Jan 31, 2020
Created on Jan 30, 2020

This example demonstrates the dynamic addition and removal of fruit shapes in an SVG bowl, where each fruit is represented as a colored circle with a label. The visualization uses D3 v5’s data join pattern to bind fruit data to SVG circle and text elements, with smooth transitions animating the circles’ positions and radii over one second when data updates. React serves as the integration framework, while D3’s ordinal scales map fruit types to colors and sizes, and exit selections shrink departing circles to zero radius before removal.

AI-generated description

A bare minimum HTML page.

See also React Starter.