Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
MMuhammad Jarir Kanji
Last edited Feb 1, 2021
Created on Dec 15, 2020

A bar chart ranks ten countries by population from a CSV dataset, using horizontal bars to compare values like China's 1.4 billion against Nigeria's 196 million. The chart relies on D3's `scaleLinear` and `scaleBand` to map population and country names, with `axisLeft` and `axisBottom` generating the axes. Bars are drawn as SVG rectangles, filled steelblue, and the population values are converted from thousands via `d3.csv` and JavaScript's `+` operator. The visualization uses an SVG canvas of 960 by 500 pixels.

AI-generated description
MIT Licensed

Similar vizzes