Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Smiley Face Part II

Public visualization

Viewing a saved revision (read-only)

cfcdcacfa9684f7aaf5ef9d581a2b1bd

Fork of Smiley Face Part II

1 star2🌍 Public
DDavid Kim
Last edited Apr 16, 2022
Created on Apr 10, 2022

This interactive visualization displays a single circle that follows the mouse cursor as it moves across an SVG canvas. The circle’s position is updated continuously based on the user’s pointer coordinates. Built with React 16.9 and D3 v7, the app uses React’s `useState` and `useCallback` hooks to manage mouse-position state, while event handling is implemented via the SVG `onMouseMove` attribute. The visualization renders declaratively—when the mouse moves, the `cx` and `cy` attributes of the circle are recomputed, causing React to update the SVG in real time.

AI-generated description

A program that follows your mouse with circle