Skip to main content
100%

Fork of Axes with React & D3

✓ Published1🌍 Public
SSreekar Reddy
Last edited May 15, 2021
Created on May 15, 2021

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, using data from the United Nations World Population Prospects 2019. The chart displays axes rendered as SVG elements, with a linear scale for population values and a band scale for country labels. The code leverages React hooks (useState, useEffect, useCallback) to fetch and manage the CSV data, while using d3.csv, d3.scaleBand, and d3.scaleLinear for data processing and scaling. The visualization is rendered entirely through React components, producing SVG rects, lines, and text elements.

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