Skip to main content
100%

Untitled

✓ Published0🌍 Public
Rrainyrainyguo
Last edited Nov 26, 2020
Created on Nov 26, 2020
Forked from React Starter

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 description

React Starter code.

MIT Licensed

Similar vizzes