Skip to main content
100%

Customizing axes

✓ Published1🌍 Public
Ssara17585
Last edited Nov 14, 2019
Created on Nov 14, 2019
Forked from Making a bar chart

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
MIT Licensed

Similar vizzes