Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering data with react and d3 (CSS colors)

Public visualization

Fork of Rendering data with react and d3 (CSS colors)

0 stars1🌍 Public
AAlexander Dorling
Last edited May 12, 2021
Created on May 12, 2021

This example displays all named CSS colors as a radial burst, with each color represented as a slice of a pie chart emanating from the center. It loads color data from a CSV file using `d3.csv`, then uses React’s `useState` and `useEffect` hooks to manage the asynchronous data fetching. The visualization renders SVG paths via React, with `d3.pie` and `d3.arc` computing the slice angles and geometry. Each path’s fill is set directly from the CSV’s RGB hex value column.

AI-generated description

A program that loads basic data about css named colours using D3 utilities, uses React to render data as a radial burst. nice!

Comments

Sign in to join the discussion.

MIT Licensed