Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Render Data with React & D3

Public visualization

Viewing a saved revision (read-only)

8a6ea4379cc34280bfda942d7e06ae62

Fork of Render Data with React & D3

0 stars1🌍 Public
NNoelle Huchette
Last edited Jan 14, 2023
Created on Jan 14, 2023

This example shows a horizontal bar chart of the top 10 countries by 2020 population, rendered as SVG rectangles sized by population. The app uses React state and hooks to fetch a CSV from a gist, parse it with `d3.csv`, and map the data to scales via `d3.scaleBand` and `d3.scaleLinear`. The chart updates reactively when data loads, displaying a simple loading message until then.

AI-generated description

Renders data with D3, uses react state to keep track of data