Untitled
✓ Published0🌍 Public
A button click triggers a bar chart transition where five of the ten letters A–J are randomly selected and assigned numeric values, then sorted alphabetically. The chart updates with staggered animations: exiting bars shrink to zero width, while entering and persisting bars grow to their new lengths after a one-second delay. Built with D3 v4 in React, the code uses `scaleBand`, `scaleLinear`, `axisLeft`, and sequential Viridis color scaling, with SVG `rect` elements animated via `transition.attrTween` on the `width` and `y` attributes.
AI-generated descriptionReact Starter code.
MIT Licensed