Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

abaa76974eab44c389902b65499ac011

Making a Bar Chart

0 stars0🌍 Public
Zzaki952
Last edited Apr 4, 2019
Created on Apr 4, 2019

This example uses D3 v5 to render a bar chart of the world’s most populous countries, based on 2018 United Nations population estimates. It reads data from a CSV file and displays each country’s population as a horizontal bar, using `d3.csv` for loading, `scaleLinear` for the x-axis, `scaleBand` for the y-axis categories, and `axisLeft`/`axisBottom` for labeled ticks. SVG elements are appended and styled with a steelblue fill.

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.