Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
Kkaylee4m
Last edited Mar 18, 2019
Created on Mar 18, 2019
Forked from Making a Bar Chart

This chart displays the populations of the top 10 most populous countries using 2018 United Nations data, with horizontal bars sorted by country name. It uses d3.csv to load the data, then d3.scaleLinear and d3.scaleBand to map population values and country labels to SVG rectangles. The axes are generated with d3.axisLeft and d3.axisBottom. The code imports specific functions from the d3 v5 module and renders the visualization entirely in SVG, with a steelblue fill for each bar.

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.

MIT Licensed

Similar vizzes