Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Smiley face part 1

Public visualization

Viewing a saved revision (read-only)

8f3185aaa38c4d0bb2ad983643d54737

Fork of Smiley face part 1

0 stars0🌍 Public
Zzyniax
Last edited Apr 7, 2021
Created on Apr 6, 2021
Forked from Smiley face part 1

This example renders a single interactive circle that follows the mouse cursor across an SVG canvas. The visualization uses React’s `useState` and `useCallback` hooks to track `clientX` and `clientY` coordinates from the `onMouseMove` event, updating the circle’s center position in real time. Rendered via ReactDOM and SVG, the circle’s radius is fixed at 30 pixels, and the initial position is set to the center of a 960×500 viewport. The underlying d3 library is loaded but not directly used in the interaction logic.

AI-generated description

Half way towards a smiley face. Smiley mark down (MD).