Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Menu Part 1

Public visualization

Viewing a saved revision (read-only)

d83013ceb93a49a7a8cccb9db4ca9950

Fork of Menu Part 1

0 stars0🌍 Public
Mmbooch22
Last edited Dec 19, 2022
Created on Dec 19, 2022
Forked from Menu Part 1

This example creates 50 randomly sized and positioned circles on an SVG canvas using D3 v5 and React 16 hooks. The circles bounce horizontally across the screen via a `d3.timer` callback that updates their `cx` attributes each frame. A button labeled "Sort" reorders the circles by descending radius using a JavaScript state update, while a "Revert" button randomizes their positions again. It demonstrates integrating D3 selections with React's `useState` and `useEffect` for managing dynamic visual state.

AI-generated description

Smiley face implementation with React & D3.