🌍 Public
Viewing a saved revision (read-only)
a781aec35ab44432a5d07dcfff6543e0
Making a Barchart
This example shows a horizontal bar chart of population counts for ten countries, using data loaded from a CSV file. The visualization maps population values to bar widths via a linear scale and country names to vertical band positions with a band scale. The code relies on D3 v5 APIs including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, rendering the bars and axes as SVG elements. Styling is applied through CSS, with bars filled in steel blue and axis text enlarged.
AI-generated description