Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with react and D3

Public visualization

Viewing a saved revision (read-only)

7707ad7dbecf47a19dbd29f112178ebf

Loading data with react and D3

0 stars0🌍 Public
KKIRRAN P L
Last edited Dec 2, 2023
Created on Dec 2, 2023
Forked from Mouse Follower

A React component tracks mouse position in state, rendering a D3-selected circle that follows the cursor. The visualization uses `d3.select` to manage an SVG and `selectAll` with a data join to update the circle’s `cx` and `cy` attributes on each `mousemove` event. Initial state is set to the window’s center, and the circle’s radius remains fixed at 50 pixels. The example demonstrates how D3’s selection and join methods integrate with React’s state management to synchronize UI updates.

AI-generated description

A prog that load in some data using D3 utilities, and uses React state to keep track of the data.