Pathetic Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 countries by 2020 population, rendered with React and SVG. It loads UN population data from a CSV using the `d3.csv` utility, then maps each country to a `rect` element. The chart uses `d3.scaleBand` for the y-axis country categories and `d3.scaleLinear` for the x-axis population values. The data is fetched inside a `useEffect` hook and stored in state via `useState`, with a loading message displayed before the data arrives.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed