Skip to main content
100%

bar chart

✓ Published1🌍 Public
Ppei9223
Last edited Sep 11, 2022
Created on Sep 11, 2022
Forked from d3js

This horizontal bar chart displays the population of the top 10 most populous countries using 2018 estimates from the United Nations’ World Population Prospects 2017. The view prioritizes the data, showing each country’s population as a steelblue rectangle scaled by d3.scaleLinear, with country names positioned on a d3.scaleBand axis. The code uses D3 v5 APIs including d3.csv, d3.axisLeft, and d3.axisBottom to render the SVG chart, with margins and inner dimensions computed from the fixed width and height of the SVG element. Population values are converted from thousands to full numbers before plotting.

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