Skip to main content
100%

Refactored Bar Chart

✓ Published0🌍 Public
Ttrissentety
Last edited Feb 6, 2023
Created on Feb 6, 2023
Forked from React D3 Axes

This example shows the ten most populous countries in 2020 using a horizontal bar chart, rendered with SVG elements inside a React application. The chart deliberately appears "pathetic" with no axes or value labels, presenting only the country names on the left and proportional bars extending rightward. The code builds the visualization using React’s `useState` and `useEffect` hooks alongside D3 v5 utilities, including `scaleBand`, `scaleLinear`, and `max`, while loading data from a CSV file via D3’s `csv` function. The data source is the United Nations World Population Prospects 2019.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes