Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Selection Exploration

Public visualization

Viewing a saved revision (read-only)

01630e986aeb4530b7000f2206bd7a38

D3 Selection Exploration

0 stars1🌍 Public
Ddanheavern
Last edited May 7, 2022
Created on May 7, 2022
Forked from HTML Starter

This example demonstrates D3’s data join and selection patterns by animating a row of circles whose count and vertical positions oscillate with a sine wave. The code uses `d3.select`, `d3.range`, and `selectAll().data().join()` to update SVG circles at 60 frames per second, while a commented-out version shows the older `enter()`/`merge()`/`exit()` workflow. The visualization renders directly into the browser window via an SVG element sized to `window.innerWidth` and `window.innerHeight`, with no external data source.

AI-generated description

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

See also React Starter.