Skip to main content
100%

Fork of react bar 2

✓ Published1🌍 Public
MMalcolm Mead
Last edited Jan 18, 2022
Created on Jan 18, 2022
Forked from react pie chart

This example shows a horizontal bar chart ranking the top 10 countries by 2020 population, with bars drawn as SVG rectangles inside a React component. The chart uses `d3.csv` to load UN population data from a gist URL, then transforms it with `scaleBand` for the y-axis and `scaleLinear` for the x-axis. The React app manages the data asynchronously via `useState` and `useEffect`, rendering a loading message until the data arrives. The visualization is a simple one: yellow bars extend from the left, sized proportionally to each country’s population.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes