Fork of Axes with React & D3
✓ Published1🌍 Public
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 descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed