Making a Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking the populations of ten countries, with values scaled in thousands. The visualization uses D3 v5 to load CSV data, map population values to a linear scale, and country names to a band scale. SVG rectangles are rendered and axes are drawn using d3.axisBottom and d3.axisLeft. The code applies margin conventions, padding, and steelblue fill via CSS.
AI-generated descriptionMIT Licensed