Skip to main content
100%

Stylized Bar Chart with React & D3

✓ Published1🌍 Public
MMinh Luong
Last edited Jan 8, 2022
Created on Jan 8, 2022

This stylized bar chart displays the top 10 countries by estimated 2020 population, using horizontal bars derived from UN population data loaded with d3.csv. The React app manages data loading through a custom useData hook and renders an SVG composed of reusable components for axes and marks. D3’s scaleBand and scaleLinear map countries and population values, while d3.format converts large numbers into abbreviated strings like “1.23B” for axis ticks and tooltips.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes