Skip to main content
100%

Customizing Axis

✓ Published1🌍 Public
Pprincit
Last edited Apr 28, 2020
Created on Mar 24, 2020
Forked from Making a Bar Chart

This example shows the top 12 most populous countries using horizontal bars ordered by population. It uses d3.csv to load population data (in thousands, converted to raw counts), d3.scaleBand for the categorical country axis, and d3.scaleLinear for the numerical population axis. Customized axes include removed domain lines, formatted tick labels with abbreviations (e.g., "1.41B"), and a custom axis title, all rendered as SVG. D3’s axisLeft and axisBottom generate the ticks and grid lines.

AI-generated description
MIT Licensed

Similar vizzes