Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Selections

Public visualization

Viewing a saved revision (read-only)

a0c4a3d6b51b47c9bf16d8b1ef5586dc

Fork of D3 Selections

0 stars0🌍 Public
Sstevensmithj
Last edited May 5, 2022
Created on May 5, 2022
Forked from D3 Selections

Two animated SVG panels demonstrate D3 selections and data joins. The top panel shows black circles on a white background, while the bottom panel renders the same dataset in white on black, driven by a 60fps interval. Each frame regenerates data via `makeData`, using trigonometric functions like `Math.tan` and `Math.cos` to animate circle positions and radii. The `vizDraw` function applies a D3 data join with `selectAll('circle').data().join('circle')` to update attributes, while `d3.range` generates the underlying sequence of values.

AI-generated description