🌍 Public
Viewing a saved revision (read-only)
43eb1253677949c0b7123b152e9d15ea
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.