Skip to main content
100%

Fork of Axes with React & D3

✓ Published0🌍 Public
Jjcar@vt.edu
Last edited Jun 18, 2024
Created on Jun 18, 2024

This example displays the top 10 most populous countries as a horizontal bar chart, with custom axes rendered manually rather than using D3’s axis components. It uses React hooks (`useState`, `useEffect`) to load and slice CSV data from the United Nations World Population Prospects 2019, then renders SVG bars via `scaleBand` and `scaleLinear`. D3’s `csv` fetches the data, while tick marks and labels are generated from `xScale.ticks()` and the domain. The chart lacks explicit axis lines, leaving only tick values and country names.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes