Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with React and D3

Public visualization

Viewing a saved revision (read-only)

3db1bffd9bae46c188ad42b16bcae501

Axes with React and D3

0 stars1🌍 Public
Ddiska432
Last edited Jul 5, 2023
Created on Jul 5, 2023

This example displays horizontal bar charts of the top ten countries by 2020 population from a United Nations CSV dataset. It uses React state to load the data through D3's `csv` utility, then renders an SVG with D3's `scaleBand` and `scaleLinear` for the axes. The code draws axis lines and tick labels via `.ticks()`, and creates the bars as SVG `rect` elements.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data