Skip to main content
100%

Bar chart

✓ Published1🌍 Public
HHui Zhang
Last edited Jul 6, 2021
Created on May 14, 2021
Forked from Smile Face

This bar chart displays the populations of the top 10 most populous countries in 2021, ranked from China to Mexico. The visualization uses a horizontal bar layout, with population values plotted on a linear x-axis and country names on a banded y-axis. The data is loaded from a CSV file using D3’s `csv` function and rendered as SVG rectangles. The code applies `scaleLinear` and `scaleBand` for scaling, and customizes axes with `axisBottom`, `axisLeft`, and tick formatting that converts values to billions.

AI-generated description

This bar chart shows population of Top 10 countries in 2021. The data comes from Countries in the world by population (2021)

MIT Licensed

Similar vizzes