Bar Charts
This bar chart displays the 2018 estimated populations of the top 10 most populous countries, sourced from the United Nations World Population Prospects 2017. It uses D3’s `scaleLinear` for the x-axis (population in millions) and `scaleBand` for the y-axis (country names), with bars rendered as SVG rectangles. The example demonstrates custom axis styling and builds on a prior bar chart tutorial, showing how to map data to visual properties via D3’s scales and selection API.
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.