Fork of Making a Bar Chart
✓ Published0🌍 Public
This chart visualizes the top 10 most populous countries, with horizontal bars ranked by population using 2018 data from the United Nations World Population Prospects. Built with D3 v5, it renders as an SVG and customizes the axes, removing domain lines and formatting tick labels to abbreviate large numbers (e.g., ‘B’ for billions). The code relies on D3’s `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft`, while styling bars with steelblue fill via CSS.
AI-generated descriptionThis 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