🌍 Public
Viewing a saved revision (read-only)
1fddd8ea2eff4075abe88882ab455fa5
Making a Bar Chart
This example shows a horizontal bar chart of country populations, using a linear scale for population values and a band scale for country names, with bars drawn as SVG rectangles. The code loads data from a CSV file, parses population numbers, and renders axes with D3’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` functions. Bars are filled with a steel-blue color via CSS, and the chart is drawn entirely with SVG elements inside a fixed-size canvas.
AI-generated description