mouse follower
✓ Published0🌍 Public
This example shows a single green circle that follows the mouse pointer across an SVG canvas. Moving the mouse updates the circle’s position via `d3.pointer` and state management, while clicking changes its fill color to a random hex value. The code uses D3 v7, with `select`, `pointer`, and data joins to bind the circle’s coordinates and radius. The visualization demonstrates reactive updates through a `setState` callback, with the circle rendered at half opacity.
AI-generated descriptionCreating circles with D3.
Challenge
- Fork this example
- Modify it
- Maybe make it Halloween themed
- Maybe make it Christmas themed
- Be creative
MIT Licensed