🌍 Public
Viewing a saved revision (read-only)
3e883e9b3d164be48133dacbfb6b9720
Building a Bar Chart
This example shows a horizontal bar chart of the ten most populous countries, ordered alphabetically, with population displayed on the x-axis. It uses d3.csv to load data.csv and d3.scaleLinear and d3.scaleBand to map population values and country names to pixel coordinates. The chart is rendered as SVG, with axes created via d3.axisLeft and d3.axisBottom, and bars drawn as `rect` elements filled with steelblue.
AI-generated description