Skip to main content
Public

Share visualization

Loading preview…

Fork of Clickable Circles from CSV

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

Fork of Clickable Circles from CSV

0 stars0Public
KKamil Poprawa
Last edited Sep 19, 2026
Created on Sep 19, 2026

This example displays a scatterplot of colorful circles loaded from a CSV file, with click interaction to highlight a selected node. Written in React, it uses D3’s `selectAll` and `data` join to bind CSV rows to SVG circle elements, mapping `cx`, `cy`, `r`, and `fill` attributes. A React `useState` hook tracks the selected circle’s ID, and clicking a circle triggers a re-render that adds a black stroke to the chosen node. The code imports `csv` from D3 to parse the data and passes it to a reusable `viz` function that updates the visualization.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed