Skip to main content
100%

Stylized Bar Chart

✓ Published0🌍 Public
PPatric Tysk
Last edited Nov 14, 2021
Created on Nov 14, 2021
Forked from Stylized Bar Chart

This example presents a horizontal bar chart ranking the top 10 most populous countries using United Nations World Population Prospects 2019 data, with population values labeled in billions. The visualization is built with React components that render SVG elements, using D3 v5’s `scaleBand` for the categorical country axis and `scaleLinear` for the population axis. Each bar is a `<rect>` element with a native SVG `<title>` tooltip showing the formatted population value. Custom axis components generate tick marks and labels, while the D3 `format` function converts raw numbers into compact “B” suffix notation.

AI-generated description

A program that shows the top 10 most populous countries as a bar chart.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes