Skip to main content
100%

barChart

✓ Published1🌍 Public
RRahul Gupta
Last edited Mar 7, 2021
Created on Mar 7, 2021
Forked from D3 pieChart

This example displays the top 10 most populous countries as horizontal bars, with no axes or labels to guide interpretation. The chart uses React to manage state and render SVG rectangles, while D3’s `scaleBand` and `scaleLinear` map country names to vertical positions and population values to bar widths, respectively. Data comes from the United Nations World Population Prospects 2019 dataset, loaded via D3’s `csv` function and filtered to the first ten rows. The visualization intentionally omits scales, leaving the raw bars to convey relative sizes.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes