Making a bar chart
This horizontal bar chart visualizes the population of the top 10 most populous countries using 2018 estimates from the United Nations World Population Prospects. The chart displays population values on the x-axis with a custom tick format that abbreviates large numbers (e.g., “1.42B”) and country names on the y-axis. The visualization uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs, with bars rendered as SVG `rect` elements. Data is loaded from a local CSV file, and axes are customized by removing domain lines and adding axis labels.
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.