Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

A program that follows your mouse with a circle.

Public visualization

Viewing a saved revision (read-only)

e8262defd33d490a86181482134a3b52

A program that follows your mouse with a circle.

0 stars1🌍 Public
TTemoSmoev
Last edited Jun 14, 2022
Created on Jun 14, 2022
Forked from Smiley face Part I

A circle follows the mouse cursor across an SVG canvas, with its position updating in real time as the pointer moves. The code uses React's `useState` hook to track the cursor's client coordinates and re-renders the circle's `cx` and `cy` attributes accordingly. The example imports `range` from d3.v7 and builds an SVG element with a mouse-move event handler that captures the cursor's position. No data visualization occurs; the interaction is purely a demonstration of event handling and state-driven SVG rendering in a React environment.

AI-generated description

A program that follows your mouse with a circle.