Skip to main content
100%

Customizing Axis

✓ Published0🌍 Public
Bbharatbobby
Last edited Feb 28, 2022
Created on Feb 28, 2022

This example highlights how axis customization can clarify large-number data, using a horizontal bar chart of top countries by population. The chart displays population values in billions, with custom tick formatting that converts D3’s scientific notation (e.g., “1.41G”) into a clearer “B” suffix. The bar chart is rendered in SVG using D3 v7’s scaleLinear, scaleBand, axisBottom, and axisLeft. Data is loaded from a CSV file via d3.csv, with population figures multiplied by 1000. Styling uses CSS for the steelblue rectangles and sans-serif text.

AI-generated description
MIT Licensed

Similar vizzes