Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
JJanet Li
Last edited Aug 14, 2021
Created on Aug 14, 2021
Forked from Margins and Axes

A horizontal bar chart displays the ten most populous countries from the 2020 UN Population dataset, loaded via `d3.csv`. The React component manages the fetched data with `useState` and `useEffect`, then renders SVG bars sized by `scaleLinear` and positioned by `scaleBand`. Axis ticks are generated manually by mapping over `xScale.ticks()` and `yScale.domain()`, with labels and lines drawn as React elements, demonstrating D3 scales and the React-D3 integration pattern.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes