Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars1🌍 Public
Sstevensmithj
Last edited Feb 4, 2022
Created on Feb 4, 2022

This example displays a pie chart of CSS named colors, with each slice filled using the color’s own RGB hex value, creating a rainbow-like wheel. It loads the data from a CSV file via D3’s `csv` utility, then stores the result in React state using `useState` and `useEffect`. The SVG rendering uses D3’s `arc` generator to compute each path’s `d` attribute, with React mapping over the data array to produce the paths.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed