Skip to main content
100%

Very Simple Bar Chart with React and D3

✓ Published0🌍 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
MIT Licensed

Similar vizzes