Skip to main content
100%

Axis With React & D3

✓ Published1🌍 Public
Ffjvoris
Last edited Mar 5, 2023
Created on Mar 5, 2023

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, using React to render SVG elements and D3 to load and scale the data. The chart displays country names on the y-axis and population values on the x-axis, with tick marks and labels generated via `xScale.ticks()` and `scaleBand` for the y-axis. The code utilizes `d3.csv`, `scaleLinear`, and `scaleBand` from D3 v5, while React hooks manage the asynchronous data loading and component state. Data comes from a CSV file fetched from a GitHub gist.

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