Skip to main content
100%

Axis with React & D3

✓ Published1🌍 Public
GGul Jamal Zim
Last edited Jun 9, 2021
Created on Jun 9, 2021

This example shows a horizontal bar chart of the top 10 countries by 2020 population, rendered as SVG using React components. The code loads data from a CSV file of UN population estimates via the `csv` function from D3 v5, then uses `scaleLinear` for the x-axis and `scaleBand` for the y-axis. React's `useState` and `useEffect` hooks manage asynchronous data loading, while ReactDOM renders the chart and D3-generated tick marks. The visualization combines React's component model with D3's scales and axis utilities for a straightforward data-driven layout.

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