Making a Bar chart
This example shows a horizontal bar chart of population data for the ten most populous countries, with the bars ordered alphabetically by country name and scaled by population. It uses d3.csv to load the dataset, d3.scaleLinear for the x-axis, d3.scaleBand with padding for the y-axis, and d3.axisLeft and d3.axisBottom to render the axes. The SVG is 960 by 500 pixels, with margins applied and rectangles filled in steelblue, reflecting a static, data-driven visualization built with d3 v5.