Skip to main content
100%

Bar Chart - Axis Customization

✓ Published1🌍 Public
AAngus Hon
Last edited Sep 7, 2019
Created on Aug 31, 2019
Forked from Bar Chart

This bar chart displays the world’s top ten most populous countries, with population values scaled in thousands from a local CSV file. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map populations and country names to SVG rectangles. Axis customization is a key feature: the x-axis uses a custom tick formatter to abbreviate large numbers with `format('.3s')` and replaces 'G' with 'B', while the y-axis removes its domain and tick lines. Both axes employ `axisBottom` and `axisLeft`, with x-axis tick lines extended across the plot using a negative tick size.

AI-generated description
MIT Licensed

Similar vizzes