Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React and D3

Public visualization

Rendering Data with React and D3

0 stars1🌍 Public
MMaciek Sitkowski
Last edited Sep 23, 2020
Created on Sep 23, 2020

A radial burst of 148 named CSS colors, each rendered as a wedge of a pie chart, displays the dataset’s full hue spectrum. The visualization loads data from a CSV file via `d3.csv`, then uses `d3.pie()` and `d3.arc()` to compute the angles and paths. React’s `useState` and `useEffect` manage the asynchronous data fetching, while each `<path>` element’s `fill` is set directly from the row’s `RGB hex value` property. The SVG is centered with a `<g>` transform, and the chart initially shows a loading message before rendering.

AI-generated description
  • render data using React and D3 as a radial burst
  • dataset used: named CSS colors

Comments

Sign in to join the discussion.

MIT Licensed