Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower Simple

Public visualization

Fork of Mouse Follower Simple

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed