Skip to main content
100%

Customizing axes

✓ Published1🌍 Public
TTimothy sit
Last edited Dec 28, 2020
Created on Dec 27, 2020
Forked from Making a barchart

This example demonstrates a horizontal bar chart displaying population data for five countries, with custom-formatted axes. The x-axis uses `d3.format('.3s')` to abbreviate large numbers and replaces 'G' with 'B' to show billions, while both axes remove their domain lines and grid lines are extended via `tickSize`. The chart is rendered as SVG using D3 v6, with scales built via `d3.scaleLinear` and `d3.scaleBand`, and axes created through `d3.axisLeft` and `d3.axisBottom`. Data loads from a CSV file using `d3.csv`.

AI-generated description
MIT Licensed

Similar vizzes