Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
Sshungshung
Last edited Feb 23, 2020
Created on Feb 23, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart ranking the top 10 most populous countries, with population values scaled and formatted in billions. It demonstrates customized axes: the y-axis removes its domain and tick lines, while the x-axis uses a tick format that abbreviates numbers (e.g., converting "G" to "B") and includes a translated label. The code uses d3.csv, d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom, rendering SVG rectangles with a steelblue fill. Data comes from a local data.csv file, processed by multiplying population values by 1,000.

AI-generated description

This bar chart shows

MIT Licensed

Similar vizzes