Skip to main content
100%

Fork of Rendering Data with React & D3

✓ Published0🌍 Public
TTylerSaikaleyTheriault
Last edited May 30, 2022
Created on May 30, 2022

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 description

A 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

Similar vizzes