Skip to main content
100%

React & D3 CSV

✓ Published0🌍 Public
MMuhammad Talha
Last edited Jul 27, 2021
Created on Jul 4, 2021

This example shows a horizontal bar chart of population data for ten countries, with country names on the y-axis and a linear population scale on the x-axis. Built with React and D3 v7, it loads CSV data via `d3.csv` and renders SVG rectangles scaled by `d3.scaleLinear` and `d3.scaleBand`. The custom `AxisBottom` component generates tick marks and labels using `xScale.ticks()`, while React hooks manage data loading and state.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes