Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Interaction with React

Public visualization

Viewing a saved revision (read-only)

d1dc0d05ed4f48af84c6ff7b97c5f0bc

Interaction with React

0 stars0🌍 Public
EEd Hutchinson
Last edited Apr 16, 2023
Created on Apr 16, 2023

This example shows a single yellow circle that follows the mouse cursor across a 960-by-500 SVG canvas. Built with React 16.9 and D3 v5, the app uses the `useState` and `useCallback` hooks to track the cursor’s `clientX` and `clientY` coordinates, updating the circle’s `cx` and `cy` attributes on every `mousemove` event. The D3 `arc` import is included but unused in the visible code.

AI-generated description

Smiley face implementation with React & D3.