Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 Public
Mmerha-g-selassie
Last edited Feb 7, 2020
Created on Dec 13, 2019
Forked from D3 Axes

This example visualizes the top 10 most populous countries using a horizontal bar chart ordered by population. The chart displays population values on the x-axis with tick labels formatted in billions (e.g., "1.42B") and country names on the y-axis. It uses D3 v5’s `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to load data and render SVG elements programmatically. The bars are filled with steelblue, and axis lines are removed for a cleaner presentation. The data comes from `data.csv`, which is loaded asynchronously via D3’s `csv` function.

AI-generated description
MIT Licensed

Similar vizzes