Making a Bar Chart
✓ Published0🌍 Public
This example presents a bar chart of the populations of the ten most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The chart shows each country labeled on the y-axis and the population value on the x-axis. The visualization is built with D3 v5, using `select` to target the SVG, `csv` to load data, `scaleLinear` and `scaleBand` for axes, and `axisLeft` and `axisBottom` to render them. The bars are drawn as SVG rectangles, and the data is scaled by a factor of one thousand.
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.
MIT Licensed