Skip to main content
100%

In the Margins

✓ Published1🌍 Public
JJeff Wagner
Last edited Jun 8, 2023
Created on Jun 8, 2023
Forked from Pathetic Bar Chart

This example visualizes the top 10 most populous countries in the world using a horizontal bar chart. The bars are rendered as SVG rectangles, with their lengths scaled proportionally to each country’s 2020 population estimate from the UN Population data. The code uses React with hooks like `useState` and `useEffect` to load and manage the data, and D3 modules such as `scaleBand` and `scaleLinear` for positioning and scaling. The chart is drawn entirely with SVG, with margins applied to the axis area.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes