Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
AAndres Bizzarri
Last edited Jan 4, 2020
Created on Jan 3, 2020
Forked from Customizing Axes

This example shows a horizontal bar chart of the top ten most populous countries, with the x-axis formatted in billions and the y-axis stripped of its domain line and ticks for a cleaner look. The chart loads population data from a CSV file, multiplies the raw values by 1,000, and renders SVG bars using D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`. The y-axis is customized by removing its domain and tick lines, while the x-axis tick labels use D3’s `format(".3s")` to abbreviate numbers and replace "G" with "B".

AI-generated description
MIT Licensed

Similar vizzes