Making a Bar Chart
This example shows a horizontal bar chart of population figures for the world’s most populous countries, drawn as an SVG. It uses d3.csv to load the data, multiplying each population value by 1000, then maps values with d3.scaleLinear and d3.scaleBand. Axes are added via d3.axisLeft and d3.axisBottom, while rectangles are appended for each bar.