Skip to main content
100%

D3 Bar Chart Customising Axes

✓ Published1🌍 Public
Aadbirch
Last edited Jan 25, 2023
Created on Jan 20, 2023
Forked from D3 Bar Chart

This example shows a horizontal bar chart of the populations of the world’s ten most populous countries, with customized axes. It uses d3.csv to load data from a CSV file and d3.scaleBand for the country categories, while d3.scaleLinear maps population values to bar widths. The chart employs d3.axisBottom and d3.axisLeft, with tick formatting via d3.format to abbreviate large numbers into billions. Axis lines and tick marks are selectively removed, and labels for the title and axis are added as SVG text.

AI-generated description
MIT Licensed

Similar vizzes