Skip to main content
100%

Tweaking the Bar Chart

✓ Published2🌍 Public
NNathan Neelis
Last edited Nov 9, 2020
Created on Nov 5, 2020
Forked from Making a Bar Chart

A horizontal bar chart displays the populations of the ten most populous countries, with values in thousands and bars sorted from largest to smallest. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map data to positions, while `axisLeft` and `axisBottom` generate the axes. Axis lines are removed via selection, and tick labels are formatted with `format('.3s')` to abbreviate numbers, replacing “G” with “B” for billions. Population data comes from a CSV file, and the visualization renders as SVG.

AI-generated description
<!-- <iframe width="560" height="315" src="https://www.youtube.com/embed/NlBt-7PuaLk?autoplay=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> -->
MIT Licensed

Similar vizzes