Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - D3 Update

Public visualization

Viewing a saved revision (read-only)

9a7d34accb73420d9ba2458e2cda7bcc

Bowl of Fruit - D3 Update

0 stars1🌍 Public
Hhenryspradlin
Last edited Jul 21, 2021
Created on Jul 8, 2021
Forked from D3 Face

This example demonstrates a dynamic fruit bowl visualization, where colored circles representing apples, lemons, and oranges enter, exit, and change type over time. It showcases D3’s data-join pattern with key functions, using `selection.data()`, `.enter()`, `.merge()`, and `.exit()` to handle updates. The code applies smooth `transition()` animations for position, radius, and fill color, mapping fruit types to colors and sizes via `scaleOrdinal`. SVG circles are rendered in an HTML page using D3 v7, with data mutations triggered by timed `setTimeout` calls.

AI-generated description