Skip to main content
100%

Simple bar chart transition

✓ Published0🌍 Public
SSoorin
Last edited Oct 17, 2017
Created on Oct 17, 2017

Three bar chart datasets are displayed through a select menu, with animated transitions between value sets using SVG rectangles. The chart shows exiting bars shrinking downward and disappearing, while new and updated bars grow from the bottom to their new heights. The code uses d3.v4’s `d3.transition()` and `selection.merge()` to handle enter, update, and exit states, with a `d3.scaleOrdinal` and `d3.schemeCategory10` for color mapping. Data is hardcoded as arrays of numbers, and the select element triggers `updateBars` on change.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes