Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Very Simple Bar Chart with React and D3

Public visualization

Viewing a saved revision (read-only)

db84f4e99d2d4fd4b095f48a14c41719

Very Simple Bar Chart with React and D3

0 stars0🌍 Public
MMaciek Sitkowski
Last edited Sep 23, 2020
Created on Sep 23, 2020

This example shows a horizontal bar chart of the ten most populous countries in 2020, using data from the UN Population 2019 dataset loaded via `d3.csv`. It displays country names on the y-axis using `scaleBand` and population values on the x-axis with `scaleLinear`, rendering the bars as SVG `<rect>` elements. The React component manages data loading with `useState` and `useEffect`, while D3 handles the scales and CSV parsing.

AI-generated description