Viewing a saved revision (read-only)
090cd04d09484a58993bfc1d8ecbcd7e
Making a Bar Chart
This example visualizes the population of the top 10 most populous countries using a horizontal bar chart, based on 2018 estimates from the United Nations World Population Prospects. The chart uses D3 v6 with SVG rendering, employing `scaleLinear` and `scaleBand` for the x and y scales, respectively, and customizing the axes with `axisLeft` and `axisBottom`. Data is loaded from a CSV file via `d3.csv`, with population values converted from thousands to absolute numbers before rendering.
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.