Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tweaking the Bar Chart

Public visualization

Viewing a saved revision (read-only)

1f3d7c63e7c64cdda29bc00c2d5fc077

Tweaking the Bar Chart

0 stars2🌍 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> -->