🌍 Public
Viewing a saved revision (read-only)
72c70b098237464da69f926b15feb14e
Making a bar chart
This horizontal bar chart displays population data for ten countries, sorted by the y-axis from China to Mexico. The visualization uses D3 v5 with an SVG canvas, mapping population to bar length via a linear scale and country names to bar position via a band scale. The code loads data from a CSV file, applies a formatting function to display large numbers, and customizes axes and labels through API calls like `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`.
AI-generated description