🌍 Public
Viewing a saved revision (read-only)
2b6d84588f8a49e3b8bf8ecbe2971e2f
Making a Bar Chart (delete)
This example shows a horizontal bar chart ranking the population of ten countries, from China to Mexico, based on data loaded from a CSV file. The visualization uses D3 v5 modules such as `csv`, `scaleLinear`, `scaleBand`, and `axisLeft` to map population values to bar widths and country names to vertical positions. The bars are rendered as SVG rectangles inside a group element, with margins applied to the chart area. The data is parsed and converted to numeric values by multiplying the population figures by 1000.
AI-generated description