Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
AAmit Kumar Sharma
Last edited Sep 9, 2020
Created on Sep 9, 2020
Forked from Making a Bar Chart

This example presents a horizontal bar chart of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The visualization customizes D3 axes by removing domain lines and tick lines, formatting population values with `format('.3s')` to abbreviate billions, and adding a title and axis label. Data is loaded from a CSV file, scaled with `scaleLinear` and `scaleBand`, and rendered as SVG rectangles. The code imports specific D3 v5 modules including `csv`, `scaleBand`, `scaleLinear`, `axisLeft`, and `axisBottom`.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.

MIT Licensed

Similar vizzes