Skip to main content
100%

Making a Bar Chart!

✓ Published0🌍 Public
Sscotti15
Last edited Mar 26, 2020
Created on Mar 26, 2020

This example displays a horizontal bar chart ranking the ten most populous countries based on 2018 estimates from the UN’s World Population Prospects. Each bar’s length encodes population in thousands, with country names on the y-axis. Built with D3 v5, the visualization uses `scaleLinear` and `scaleBand` to map data to SVG rectangles, alongside `axisLeft` and `axisBottom` for chart axes. Population values from `data.csv` are multiplied by 1000 during loading. The chart is rendered entirely as SVG elements styled with CSS.

AI-generated description

This bar chart shows population of the top 10 countries. The data comes from the year 2018 estimate in World Population Prospects 2017.

MIT Licensed

Similar vizzes