Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tracking Mouse Lesson

Public visualization

Viewing a saved revision (read-only)

c4ce283ce8cf4d8392502e62d1a739e5

Tracking Mouse Lesson

0 stars1🌍 Public
GGary Ditsch
Last edited Feb 27, 2021
Created on Feb 27, 2021

A yellow circle follows the mouse cursor across an SVG canvas, updating its position in real time as the pointer moves. The visualization demonstrates mouse-tracking interaction built with React and D3.js, where React state manages the cursor coordinates and re-renders the circle’s `cx` and `cy` attributes. The `onMouseMove` event handler captures client coordinates within an `<svg>` element, while D3 v6 is loaded but not directly used in the logic, and React’s `useState` and `useCallback` hooks support the responsive update cycle.

AI-generated description

A bare minimum HTML page.