Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
YYIN Wanxuan
Last edited Feb 8, 2020
Created on Feb 8, 2020
Forked from Making a Bar Chart

This bar chart displays the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The code demonstrates customizing D3 axes using `d3.axisBottom` and `d3.axisLeft`, with tick formatting via `d3.format` to abbreviate large numbers. It loads data from a CSV file with `d3.csv`, scales bars with `d3.scaleLinear` and `d3.scaleBand`, and renders the chart as SVG. The chart includes a title, axis labels, and grid lines, all styled with steelblue bars.

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.

MIT Licensed

Similar vizzes