Skip to main content
100%

Pseudo Scatter Plot with Clickable Circles

✓ Published5🌍 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
MIT Licensed

Similar vizzes