🌍 Public
Viewing a saved revision (read-only)
fd7e96bb7d26495f9d9c5d89c82163cf
Making a Bar Chart
This example displays a horizontal bar chart of country populations. The chart uses a linear scale for the population axis and a band scale for country names, with bars colored steelblue. The code loads data from a CSV file, converts the population values from strings to numbers, and multiplies by 1000. It uses D3 v5 with SVG rendering, building the visualization through API functions like `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`.
AI-generated description