Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Template Enter, exit and update

Public visualization

Viewing a saved revision (read-only)

46f185b5b9074b2e95c85a4f06204898

Fork of Template Enter, exit and update

0 stars0🌍 Public
CCheung-KaWai
Last edited Dec 8, 2021
Created on Dec 8, 2021

An SVG visualization demonstrates enter, update, and exit states for circle elements using D3’s selection API. It begins with six circles drawn horizontally, initially colored black based on a `scaleOrdinal` mapping. The code shows how newly created data objects receive attributes through chained `.data().enter()`, while subsequent selection updates fill colors, and `.exit().remove()` deletes elements. The example relies on D3 v7’s declarative selection methods with explicit data-driven updates.

AI-generated description

Template for workshop.