Make something, move and click mouse
✓ Published0🌍 Public
A small circle follows the mouse as it moves across an SVG canvas. Clicking the mouse drops a larger, randomly colored circle at the click position, with colors selected from a fixed palette of blue, red, yellow, green, and pink. The example uses D3.js v7 selection and event handling methods, including `svg.on('mousemove')` and `svg.on('click')`, to update circle attributes such as `cx`, `cy`, `r`, and `fill`. The SVG is sized to the full browser window.
AI-generated descriptionA circle that follows the mouse. When click the mouse, a random color, bigger circle will appear on the current position
MIT Licensed