Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Viewing a saved revision (read-only)

1f27690d9fb64e739b60f10eb96c4c3f

Fork of Rendering Data with React & D3

0 stars0🌍 Public
SSophia Chiao
Last edited May 23, 2022
Created on May 23, 2022

This example renders a radial burst visualization of CSS named colors as an SVG, with each color occupying a slice of a circle. It loads color data from a CSV file using `d3.csv`, computes arc angles with `d3.pie`, and draws the paths with `d3.arc`. React manages the component state and lifecycle, using `useState` and `useEffect` to fetch the data asynchronously, while `ReactDOM` mounts the SVG into the DOM. The visualization fills each slice with the corresponding RGB hex value from the dataset.

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!