Skip to main content
100%

Axes in React with D3

✓ Published1🌍 Public
MMilena Belianovich Holtman
Last edited Oct 13, 2022
Created on Oct 12, 2022

This example shows a horizontal bar chart of the top 10 countries by 2020 population, rendered as SVG in React. The code uses D3 utilities `csv` and `scaleBand`/`scaleLinear` to load and scale data from a UN population CSV, while React's `useState` and `useEffect` manage the async data loading. Custom tick marks and labels are drawn manually using JSX elements, with D3's `max` and `ticks` methods driving the x-axis scale and gridlines.

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