Loading Data with react & D3
✓ Published1🌍 Public
This example shows a horizontal bar chart of United Nations population data for 2019, displaying the ten most populous countries. Built with React and D3 v7, it renders SVG bar marks scaled by population along the x-axis, with country labels on the y-axis. The chart loads CSV data asynchronously using D3's `csv` function inside a custom React hook, then constructs scales with `d3.scaleBand` and `d3.scaleLinear`. Reusable axis components generate tick marks and labels, while the bars are drawn as SVG rectangles with a teal fill.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed