🌍 Public
Viewing a saved revision (read-only)
c33ea4838eb44bab93a378fa4cc3da04
Customizing axes
A horizontal bar chart displays the populations of ten countries, with bars extending from left to right. The example demonstrates customizing chart axes using D3 v5. Population values are scaled with `scaleLinear`, while country names use `scaleBand` for categorical positioning. The code uses `axisLeft` and `axisBottom` to generate axes, formats tick labels with `format('.3s')` to abbreviate large numbers, and removes default axis lines for a cleaner look. Data is loaded from a CSV file and rendered as SVG rectangles.
AI-generated description