Skip to main content
Public

Share visualization

Loading preview…

Clickable Circles

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Clickable Circles

23
CCurran Kelleher
Last edited Jul 24, 2025
Created on Jul 27, 2024
Forked from Circles with D3

This example demonstrates interactive selection of circles rendered with D3.js. Each circle displays its own position and radius, and clicking one highlights it with a black stroke and raises it above the others. The visualization uses a unidirectional data flow pattern where state changes trigger re-rendering through the `viz` function. D3’s `selectAll` and `join` methods manage circle creation and updates, while click event listeners call `setSelectedDatum` to update the selected circle’s styling.

AI-generated description

Click on a circle to see it highlight!

For examples of this in various frameworks, see d3-rosetta

Comments

Sign in to join the discussion.

MIT Licensed