Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Selection

Public visualization

Viewing a saved revision (read-only)

dba83fcee64640cfa3afe552fd680a71

D3 Selection

0 stars0🌍 Public
Ddaria.daria
Last edited Dec 31, 2022
Created on Dec 31, 2022
Forked from JS Arrays

A grid of 105 circles is drawn across the viewport, each positioned according to its index in the sequence. The example demonstrates D3's selection API by using `select('body')` and `selectAll('circle')` to append SVG circles with computed `cx` and `cy` attributes. Instead of relying on layout methods like `join`, it manually chains `data()` and `enter()` to populate the visualization. The code uses D3 v6's `range` to generate the data array, assigning each circle a fixed offset. The SVG rendering fills the entire browser window, with the circles arranged in a diagonal pattern.

AI-generated description

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

See also React Starter.