Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

12_Bowl of Fruit - General update patter

Public visualization

Viewing a saved revision (read-only)

ade656fbc8704968a98106703a1c1954

12_Bowl of Fruit - General update patter

0 stars1🌍 Public
FFMajid-ops
Last edited Dec 16, 2020
Created on Dec 14, 2020
Forked from 3_FACE D3 intro

This example demonstrates the general update pattern for enter, update, and exit selections in D3. Circles representing apples and lemons enter with zero radius, transition to their target size, and exit by shrinking to nothing. State changes include removing fruit, replacing an apple with a lemon, and filtering, all triggered by `setTimeout`. The visualization uses `d3.selectAll`, `.data()` with an id key, `.enter()`, `.merge()`, `.exit()`, and `.remove()` along with `transition().duration()`. Colors and radii come from `scaleOrdinal` ranges.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.