Skip to main content
100%

Axis with react d3

✓ Published1🌍 Public
Rrsulli4
Last edited Apr 29, 2023
Created on Apr 29, 2023
Forked from pathetic bar chart

This example uses React to render an SVG bar chart of United Nations population data for ten countries. The chart displays horizontal bars with a linear x-axis scaled to the maximum population and a banded y-axis for country names. D3 utilities `csv`, `scaleBand`, `scaleLinear`, and `max` load the data and compute scales, while React's `useState` and `useEffect` manage the asynchronous data fetching. Both axes are drawn with manual D3 tick marks, gridlines, and text labels.

AI-generated description

a program that loads in some UN pop data using d3 utilities and uses React to render the data in a bar chart.

MIT Licensed

Similar vizzes