🌍 Public
Fork of Pathetic Bar Chart
This bar chart displays the top 10 most populous countries based on United Nations World Population Prospects 2019 data. It renders horizontal bars using SVG `<rect>` elements, scaled with `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. React manages the component state, fetching the CSV via `d3.csv` and updating the visualization after loading. The chart intentionally lacks axes or labels, emphasizing raw bar lengths. The `useState`, `useEffect`, and `useCallback` hooks coordinate asynchronous data loading and rendering within a React app.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed
Comments
Sign in to join the discussion.