Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

5caf8372e0744e01b63acd66bd5905bc

Making a Bar Chart

0 stars0🌍 Public
SSupriyo Mondal
Last edited Dec 29, 2019
Created on Dec 29, 2019
Forked from Making a Bar Chart

This example displays the populations of the top 10 most populous countries using a horizontal bar chart with SVG rendering. The chart customizes D3 axes by removing domain lines and tick marks, formatting population values with abbreviations (e.g., "B" for billions) via `d3.format`, and adding axis labels and a title. Data is loaded from a CSV file using `d3.csv`, and scales are created with `d3.scaleLinear` and `d3.scaleBand`. Source data comes from the 2018 United Nations World Population Prospects estimate.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.