Making a Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of country populations, ordered from largest (China) to smallest (Mexico). Using d3.csv to load data.csv, d3.scaleLinear and d3.scaleBand map population values and country names to SVG rectangles, with d3.axisLeft and d3.axisBottom rendering labeled axes. The chart demonstrates reusable margin conventions and data-join patterns for creating bar charts with SVG.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed