🌍 Public
Viewing a saved revision (read-only)
459ecc8b42c041278e5631505cbce055
Fork of Following Circle
This example displays a single circle that follows the cursor across an SVG canvas, with its center updating to the mouse’s current position. Built with React and D3 v7, it uses React’s `useState` and `useCallback` hooks to manage mouse coordinates and re-render the circle on every `mousemove` event. The graphic is rendered as an SVG `<circle>` element, with the initial position set to the center of the 960×500 viewport.
AI-generated descriptionA circle that follows the cursor.