Building a Bar Chart
✓ Published1🌍 Public
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 descriptionMIT Licensed