Skip to main content
100%

D3 Example

✓ Published0🌍 Public
AAsadeviB
Last edited Feb 28, 2018
Created on Feb 28, 2018

This example presents grouped bar charts comparing religious affiliations across the five most populous countries, using population data loaded from a CSV via `d3.csv`. The code leverages `d3.nest` to structure data by religion and `d3.layout.stack` to layer the groups, while `d3.scale.ordinal` and `d3.scale.linear` map countries and population counts to SVG rectangles. A color legend is rendered with `d3.legend`, and axes are customized using `d3.svg.axis`. The visualization highlights stacked-to-grouped bar transitions, with styling via Open Sans fonts and D3 version 3.5.5.

AI-generated description

Grouped bars showing religion by top 5 countries. This is an example from the tutorial Splitting Charts.

<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1967779&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a></div> <!-- End of SimpleHitCounter Code -->

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/d4e2b2854f25429a06aa'>Grouped Bars</a>

forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/b6e7d4b016ce0c3edd8da4533984ee2c'>Grouped Bars</a>

mit Licensed

Similar vizzes