Skip to main content
100%

Fork of Making a Bar Chart

✓ Published0🌍 Public
EEunice Tu
Last edited Feb 17, 2024
Created on Feb 17, 2024
Forked from Making a Bar Chart

This bar chart visualizes the population of the top 10 most populous countries using 2018 estimates from the United Nations World Population Prospects. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map population counts to bar lengths and country names to vertical positions, with customized axes created through `axisLeft` and `axisBottom`. Grid lines are generated by the x-axis tick marks, and tick labels are formatted using `format('.3s')` to display values in billions. The bars are rendered as SVG rectangles with a steelblue fill, and the data is loaded from a CSV file.

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