Skip to main content
100%

Axes with react and d3

✓ Published1🌍 Public
Nnexus1058
Last edited Feb 21, 2021
Created on Feb 14, 2021

This example displays a horizontal bar chart of the top 12 countries by population in 2020, with country names on the y-axis and population values on the x-axis. It fetches CSV data from a GitHub URL using `d3.csv` and parses the population column as numbers. The chart renders as an SVG using React components, while D3 utilities `scaleBand` and `scaleLinear` compute the positions and widths of the bars, and `ticks()` generates the axis tick labels. The visualization demonstrates integrating React’s state management with D3’s data manipulation and scaling APIs.

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