🌍 Public
Viewing a saved revision (read-only)
c0adab85848e4bcdbc430cac5d801b14
D3 Making a Bar Chart
This example shows a horizontal bar chart of country populations using data from a CSV file. The chart loads population figures for ten countries, scales them by 1,000, and renders them as steel-blue rectangles with an ordinal y-axis and linear x-axis. The code uses D3 v6 APIs including `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.axisLeft`, and `d3.axisBottom` to bind data and draw SVG elements.
AI-generated description