Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Axes with React & D3

Public visualization

Viewing a saved revision (read-only)

5288331acd0c41298a8fb7e44f01d6d3

Fork of Axes with React & D3

0 stars0🌍 Public
GGopal Khandelwal
Last edited May 19, 2022
Created on May 19, 2022

This example displays a horizontal bar chart of the top 10 most populous countries in 2020, using United Nations World Population Prospects 2019 data. The visualization shows country names along the y-axis and population counts on the x-axis. Built with React and D3 v5, the code uses `scaleBand` and `scaleLinear` to compute scales, while React's `useState` and `useEffect` handle data loading. The SVG output includes grid lines and tick labels generated from `xScale.ticks()`, and the chart fills the available space with proper margins.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.