Making a Bar Chart
✓ Published1🌍 Public
This example shows a bar chart of the top 10 most populous countries using 2018 population estimates from the United Nations’ World Population Prospects. The visualization uses D3 v5 with an SVG rendering approach, employing `d3.scaleLinear` for the value axis, `d3.scaleBand` for the categorical axis, and custom `d3.axisBottom` and `d3.axisLeft` configurations. Population values are formatted with `d3.format` to abbreviate large numbers, and axis labels are added manually via SVG text elements.
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