Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Circles with D3

Public visualization

Viewing a saved revision (read-only)

80c6098bf086480abf225104fc16ffed

Circles with D3

3 stars445🌍 Public
CCurran Kelleher
Last edited Aug 4, 2025
Created on Jan 9, 2024

This example shows a set of seven colorful circles scattered across an SVG canvas, each with a distinct size, position, and fill color at 70% opacity. It demonstrates core D3.js v7 concepts including data binding, the General Update Pattern, and method chaining via `select`, `selectAll`, `data`, and `join` to render `circle` elements. The visualization uses static, data-driven coordinates and colors defined in a JavaScript array, rendered through an HTML import map loading D3 from a CDN. The code also showcases the `join` API for creating SVG circles within a container sized to the viewport.

AI-generated description

Creating circles with D3.

Challenge

  • Fork this example
  • Modify it
  • Maybe make it Halloween themed
  • Maybe make it Christmas themed
  • Be creative