Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
MMorgan Worrell
Last edited Aug 31, 2023
Created on Aug 31, 2023

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, rendered with React components as SVG elements. The code loads the UN population dataset asynchronously using `d3.csv`, then uses `scaleBand` and `scaleLinear` to position bars and generate tick marks for both axes. React manages the loading state and renders the chart only after data arrives. Custom axis lines and labels are created manually from the scales' tick values, avoiding the D3 axis component altogether.

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 radio burst.

MIT Licensed

Similar vizzes