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
UUlbert Alain Odle
Last edited Oct 10, 2021
Created on Oct 10, 2021

This example shows a color wheel visualization built from CSS named colors, with each slice of the pie representing one color from the dataset. The code loads the data using D3’s `csv` utility and manages the asynchronous state with React’s `useState` and `useEffect` hooks. The pie layout is generated with `d3.pie`, and each slice is rendered as an SVG path using `d3.arc`. The fill color of each path is taken directly from the `RGB hex value` column in the loaded CSV data, creating an immediate visual mapping between the data and its representation.

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