Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
TtrwMK
Last edited Oct 15, 2022
Created on Oct 14, 2022

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, rendered with React and D3. It loads CSV data from a GitHub gist using D3’s `csv` function, then uses `scaleBand` and `scaleLinear` to map country names and population values to pixel positions. React renders SVG elements, including manually drawn axes with `xScale.ticks()`, grid lines, and text labels, while D3’s `max` computes the domain. The chart updates from a loading state to display the final visualization.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!

MIT Licensed

Similar vizzes