Skip to main content
100%

Split bar chart

✓ Published0🌍 Public
663anp3ca
Last edited Sep 25, 2018
Created on Sep 25, 2018

This split bar chart shows how U.S. high school graduates use six social networks, breaking down each network’s share by usage frequency. The code uses d3.nest to group the CSV data by usage category, with d3.scaleBand for the inner columns and rows, and d3.schemeBuPu for color encoding. The underlying bars are drawn in light gray, while overlying bars use a linear scale to represent share values, with labels repositioned based on bar width via d3.select and classed.

AI-generated description

Clone of example from Datawrapper.

forked from <a href='http://bl.ocks.org/armollica/'>armollica</a>'s block: <a href='http://bl.ocks.org/armollica/2330ff9849436e6f129be633fe911017'>Split bar chart</a>

forked from <a href='http://bl.ocks.org/willzjc/'>willzjc</a>'s block: <a href='http://bl.ocks.org/willzjc/1be9990d96f6861f26d90179c497b1e9'>Split bar chart</a>

Similar vizzes