🌍 Public
Viewing a saved revision (read-only)
e8b3d57c3ce743e4aa1bb1cb84a6668f
Making Bar Chat
This horizontal bar chart visualizes the populations of ten countries, with each bar’s length proportional to its population value. The chart uses D3’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft`/`axisBottom` to render tick marks and labels. Data is loaded from a CSV file via D3’s `csv` function, and populations are multiplied by 1000 to convert from thousands to actual counts. The SVG output is generated in the `render` function, which appends a group element and rects positioned using the computed scales.
AI-generated description