Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

4ea9b26fee76488badb40a4cc010c0e5

Making a Bar Chart

0 stars0🌍 Public
Mmargaretgoode
Last edited May 7, 2019
Created on May 7, 2019
Forked from Making a Bar Chart

This example presents a horizontal bar chart of the populations of the ten most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The visualization uses D3 v5 to load a CSV file with `d3.csv`, then scales the data with `scaleLinear` for the x-axis and `scaleBand` for the y-axis. Axes are generated with `axisLeft` and `axisBottom`, while bars are appended as SVG `rect` elements. Population values are multiplied by 1,000 before rendering.

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.