Fork of Axes with React & D3 -- Refactor code
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 most populous countries, using React components and D3 scales. The React code defines AxisBottom, AxisLeft, and Marks components to render the SVG axes and bars, while a custom useFetch hook loads CSV data from the United Nations World Population Prospects 2019 via d3.csv. D3’s scaleBand and scaleLinear position the bars and map population values to pixel widths. The data source is accessed through a GitHub gist, and the visualization uses d3.v5 with React 16.9.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed