Skip to main content
100%

Fork of Fork of Fork of Rendering Data With REACT

✓ Published1🌍 Public
Nnkarinti
Last edited Jun 30, 2023
Created on Jun 30, 2023

This example displays a horizontal bar chart of the top ten countries by population, according to the UN Population 2019 dataset. It shows both how D3 can load and scale data and how React manages the rendering state asynchronously. The code loads data with `d3.csv`, maps values using a scaleBand for the categorical country axis and a scaleLinear for the numeric population axis, and renders `d3.rect` SVG elements. React’s `useState` and `useEffect` hooks control the data loading and display a loading message before the chart appears.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes