Skip to main content
100%

Loading data with react and D3

✓ Published0🌍 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.

MIT Licensed

Similar vizzes