Skip to main content
100%

Creating SVG circles

✓ Published1🌍 Public
DDasbach.EJ
Last edited Apr 17, 2021
Created on Apr 17, 2021
Forked from Fork of D3 Starter

This example demonstrates how to create and position SVG circles using D3 version 6. The code generates a dataset with `d3.range` containing values from 5 to 9, then binds it to circle elements via `selectAll` and `enter`. Each circle’s `cx`, `cy`, and `r` attributes are set using mathematical expressions based on the data value, viewport dimensions, and `Math.random`, resulting in randomly scattered circles of varying sizes. The visualization renders directly to the browser window using an SVG container sized to the full viewport.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes