Making a Bar Chart
✓ Published1🌍 Public
This bar chart displays the populations of the ten most populous countries using 2018 estimates from the United Nations World Population Prospects. The visualization highlights how China and India lead by a wide margin. Built with D3 v5, it uses `scaleLinear` for the x-axis and `scaleBand` for categories, with customized `axisBottom` and `axisLeft` elements. The population values are multiplied by 1000 in the code, and the SVG rendering positions steelblue rectangles while formatting tick labels with D3’s `format` function.
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