Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published1🌍 Public
TTaeyoung Ahn
Last edited Sep 5, 2021
Created on Sep 5, 2021
Forked from Pathetic Bar Chart

This example shows the top ten countries by 2020 population as horizontal bars, with bar lengths scaled proportionally to population size. The visualization uses React state to manage data loading and rendering, while D3 utilities load the CSV dataset and compute the scales. Specifically, `d3.csv` fetches the UN population data, `scaleBand` positions each country along the y-axis, and `scaleLinear` maps population values to bar widths on the x-axis. The chart renders as SVG rectangles inside a React component, updating once the data arrives and displaying a loading message beforehand.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to render the data.

MIT Licensed

Similar vizzes