Skip to main content
100%

Customising Axes with d3

✓ Published1🌍 Public
MMuhammad Jarir Kanji
Last edited Dec 15, 2020
Created on Dec 15, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the ten most populous countries, using data from a CSV file. Population values are converted from thousands to raw numbers, and d3.scaleLinear and d3.scaleBand map the data to SVG rectangles. Custom axis styling is applied with d3.axisLeft and d3.axisBottom, including a custom tick formatter that uses d3.format to abbreviate large numbers with "B" for billions. Grid lines are added via tickSize, while axis domains and tick lines are selectively removed.

AI-generated description
MIT Licensed

Similar vizzes