Skip to main content
100%

Fork of Fork of Pathetic Bar Chart

✓ Published0🌍 Public
SSam
Last edited Apr 27, 2021
Created on Apr 27, 2021

This example renders a bar chart of the top 10 most populous countries using React, with data from the United Nations World Population Prospects 2019. It uses React hooks (`useState`, `useEffect`) to load and parse the CSV via `d3.csv`, then maps the data to SVG rectangles with `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis. Gridlines and tick labels are generated from `xScale.ticks()`, though the chart lacks axes, reinforcing its "pathetic" label.

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