Making a Bar Chart
✓ Published0🌍 Public
This bar chart ranks the top 10 most populous countries in 2018, with population values from the United Nations World Population Prospects 2017. It uses D3 v5’s `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to render an SVG with a customized x-axis that abbreviates large numbers using `format(“.3s”)`. The chart includes axis labels, a title, gridlines, and excludes the y-axis domain and tick lines for a cleaner look. Data is loaded from a CSV and converted to thousands.
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