Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart w React and D3

Public visualization

Viewing a saved revision (read-only)

7e23efb41fd04c118cc71c4e20fb8da6

Bar Chart w React and D3

0 stars1🌍 Public
EErik
Last edited Oct 13, 2021
Created on Oct 13, 2021

A bar chart displays United Nations population data for the top four countries by 2020 estimates. The graphic uses React’s `useState` and `useEffect` hooks to asynchronously fetch and parse a CSV via `d3.csv`, then renders SVG `<rect>` elements whose widths are scaled by `d3.scaleLinear` and vertical positions by `d3.scaleBand`. The horizontal bars are plotted against a fixed 960×500 viewport, with countries arranged from top to bottom in data order.

AI-generated description

Smiley face implementation with React & D3.