Skip to main content
100%

Loading Data with react & D3

✓ Published1🌍 Public
Iindranil-sri
Last edited Nov 11, 2021
Created on Nov 9, 2021
Forked from mouse_follower

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes