Skip to main content
100%

D3: A bar chart that transitions to new data!

✓ Published0🌍 Public
深深度碎片
Last edited Aug 1, 2016
Created on Jul 30, 2016

A bar chart of 20 static values transitions to a new dataset when the user clicks a text prompt. Built with D3 v4, the visualization uses SVG rectangles and text labels, scaled by `d3.scaleBand` and `d3.scaleLinear`. Clicking triggers a `transition()` on both the bars and labels, animating their `y`, `height`, `x`, and fill color (a blue scale based on each value) to reflect the shuffled data order.

AI-generated description

Built with blockbuilder.org

This is an example copied from Interactive Data Visualization for the web.

I updated it with d3.v4.

gpl-3.0 Licensed

Similar vizzes