Skip to main content
100%

Stacked bar chart v4

✓ Published0🌍 Public
MMathReynaud
Last edited Jan 26, 2018
Created on Jan 26, 2018

This stacked bar chart shows ten samples across five series, with each series rendered as a color-coded segment. The visualization begins as a standard stacked bar layout, then animates the rectangles into a grouped arrangement, shifting the bars horizontally and adjusting their heights. Built with D3 v4, the code uses `d3.scaleBand`, `d3.scaleLinear`, and `d3.stack` to compute the stacked values and transitions. The SVG output is animated using the `d3-transition` library, with random data generated on the fly. The chart highlights how the same data can be represented in both stacked and grouped forms.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/romsson/'>romsson</a>'s block: <a href='http://bl.ocks.org/romsson/8aea86fddcf01380eb96a341509f394f'>Stacked bar chart v4</a>

mit Licensed

Similar vizzes