Making a Bar Chart
This example displays a horizontal bar chart ranking the top 10 most populous countries based on 2018 data from the United Nations World Population Prospects. Using D3 v5, it loads country and population values from a CSV file, applies a linear scale to the population axis and a band scale for countries, then renders steelblue rectangles as bars. The implementation imports specific D3 modules—`select`, `csv`, `scaleLinear`, `scaleBand`, and `axisLeft`—but leaves the axis-related code commented out, so only the bars appear.