Fork of Rendering Data with React & D3
✓ Published0🌍 Public
This example shows a horizontal bar chart of the top 10 countries by 2020 population, using SVG rectangles rendered by React. The code loads the UN Population 2019 dataset via `d3.csv`, processes the population values, and maps the data through `scaleBand` and `scaleLinear` for positioning. React hooks manage the asynchronous data loading and state, while the `max` utility from D3 determines the x-axis domain. The bars are drawn directly as `<rect>` elements, with widths proportional to each country’s population.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed