🌍 Public
Viewing a saved revision (read-only)
fb42d1a3b2be4302a19a11f61b8316a5
Fork of Fork of Pathetic Bar Chart
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 descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.