Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Pseudo Scatter Plot with Clickable Circles

Public visualization

Pseudo Scatter Plot with Clickable Circles

0 stars5๐ŸŒ Public
CCurran Kelleher
Last edited Jun 30, 2025
Created on Jun 25, 2025
Forked from Clickable Circles

A set of six fixed circles, rendered as an SVG scatter plot, highlights the selected point by changing its fill to white with a thick black stroke via D3's attribute and filter methods. Clicking any circle triggers a state update through a unidirectional data flow, setting a `selectedId` that re-renders all circles. The code uses D3 v7 selections and joins (`selectAll`, `data`, `join`) within an SVG set up by `setupSVG`, with click interaction bound directly to each circle.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed