Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar Chart

Public visualization

Viewing a saved revision (read-only)

425c25578afc436380b2787fd948efb9

Pathetic Bar Chart

0 stars1🌍 Public
Wwindwaver
Last edited Mar 23, 2021
Created on Mar 22, 2021

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 description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!