Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Fork of Rendering Data with React & D3

0 stars0🌍 Public
YYeeleng Scott Vang
Last edited Jun 6, 2023
Created on Jun 6, 2023

This example renders the CSS named colors dataset as a radial burst, with each color occupying an equal slice of a full circle. It loads the CSV using D3’s `csv` utility, and React’s `useState` and `useEffect` manage the asynchronous data fetch. The pie layout (`d3.pie`) and arc generator (`d3.arc`) compute the SVG path geometry, while React renders each `<path>` with a fill from the color’s hex value. The visualization demonstrates a hybrid approach where D3 handles data parsing and layout calculations, and React handles DOM rendering.

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!

Comments

Sign in to join the discussion.

MIT Licensed