Making a Bar Chart
✓ Published1🌍 Public
A horizontal bar chart displays the top 10 most populous countries based on 2018 estimates from the United Nations World Population Prospects 2017. The bars are rendered as SVG rectangles, with a linear scale for population and a band scale for countries. The code leverages D3 modules such as `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to build the chart, and customizes the x-axis tick format to abbreviate large numbers. The chart also includes a title and labeled axis.
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