Fork of Fork of Fork of Customizing Axes
This bar chart displays the populations of the world’s ten most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The visualization uses D3 v5 with SVG rendering, building on a tutorial by Curran Kelleher. It demonstrates customizing axes by applying a `scaleBand` for country labels and a `scaleLinear` for population values, using `axisBottom` and `axisLeft` with custom tick formatting that abbreviates numbers (e.g., converting “G” to “B” for billions). The chart also removes default grid lines and adds styled axis labels and titles via CSS.
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.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.