Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart: Population of 20 countries in 2010

Public visualization

Bar Chart: Population of 20 countries in 2010

0 stars1🌍 Public
KKrishna.
Last edited Oct 30, 2025
Created on Oct 30, 2025
Forked from Bar Chart

A horizontal bar chart ranks the 20 most populous countries in 2010, with each bar’s length proportional to population. The chart uses D3 v7’s `scaleLinear` and `scaleBand` to map population values and country names to pixels. Data is loaded from a CSV via `d3.csv`, processed with `d3.autoType`, and sorted using `d3.descending`. Bars are rendered as SVG `<rect>` elements with a hover color change, and axes are drawn using `d3.axisBottom` and `d3.axisLeft`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed