Skip to main content
100%

Fork of Mouse Follower Simple

✓ Published0🌍 Public
UUriel Haile
Last edited Sep 3, 2024
Created on Aug 27, 2024

A simple interactive visualization demonstrates a circle following the mouse cursor across a full-screen SVG canvas. The example uses D3 v7, selecting the SVG element and appending a circle with an initial position of (50, 50) and radius of 50. The `mousemove` event listener updates the circle's `cx` and `cy` attributes to match the mouse coordinates. This minimal code showcases D3's event handling and attribute manipulation for direct, real-time interaction without any data-driven elements.

AI-generated description

A circle that follows the mouse.

MIT Licensed

Similar vizzes