Skip to main content
100%

Refactored bar chart

✓ Published0🌍 Public
SSreekar Reddy
Last edited May 15, 2021
Created on May 15, 2021

This example presents a horizontal bar chart of the ten most populous countries, with no axes. It uses React and D3 v5's `scaleBand` and `scaleLinear` to position bars, while manually rendering tick marks and labels for both axes. Data comes from the United Nations World Population Prospects 2019 CSV, filtered to the top ten entries via `d3.csv`. The SVG output is generated entirely through React components, with loading state handled by a custom `useData` hook.

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