Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Selection Exploration

Public visualization

Viewing a saved revision (read-only)

1cb35c20d7174bfea4b0837dd8017d9e

D3 Selection Exploration

0 stars1🌍 Public
EEd Smale
Last edited Jul 19, 2023
Created on Jul 19, 2023
Forked from D3 Starter

This example demonstrates D3’s selection and data-join mechanics by continuously generating a changing set of circles. A `setInterval` updates the data array, whose length and positions vary with a sine wave, and the `svg.selectAll('circle').data(data).join('circle')` pattern creates or removes circles to match. The code uses D3 v7’s `select` and `range` functions, renders as an SVG animation, and updates element attributes (`cx`, `cy`, `r`) every 10 milliseconds.

AI-generated description

D3 Selection Exploration