Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
IIyke2909
Last edited Oct 21, 2020
Created on Oct 20, 2020

This bar chart displays the top 10 most populous countries in 2018, using population estimates from the United Nations World Population Prospects 2017. It renders horizontal bars with D3 v5’s `scaleBand` for the y-axis and `scaleLinear` for the x-axis, using `axisLeft` and `axisBottom` for ticks. The data is loaded from a CSV via `d3.csv`, with population values multiplied by 1000. The SVG output uses `g.selectAll('rect')` to draw each bar, 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.

MIT Licensed

Similar vizzes