Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
TTousifAhamed
Last edited Sep 20, 2021
Created on Sep 19, 2021

This example shows a horizontal bar chart of the top 10 countries by population in 2020, rendered as SVG elements. React manages the chart's state, fetching and parsing the United Nations population CSV data with D3's `csv` utility. D3's `scaleLinear` and `scaleBand` map the data to x- and y-axis positions, while `xScale.ticks()` generates gridlines and labels. The axes, tick marks, and bars are all React-generated `<rect>` and `<text>` elements within an `<svg>` container.

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