Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CSS Colors Pie

Public visualization

Viewing a saved revision (read-only)

6c0837526a8a40d09e29327873b8405f

CSS Colors Pie

0 stars1🌍 Public
CChira Cezara Victoria
Last edited Oct 2, 2021
Created on Oct 2, 2021

A pie chart displays every CSS named color as a wedge of equal size, revealing the spectrum of color names from reds to blues. The visualization loads color data from a CSV file via `d3.csv` and uses React’s `useState` and `useEffect` hooks to fetch and store the data. D3’s `pie()` generator and `arc()` path generator create the circular segments, which are rendered as SVG paths filled with the corresponding hex value. React renders the SVG elements, while two versions of D3 are loaded, with the newer one providing the pie-layout utilities.

AI-generated description

A program that loads [data about CSS named colors] (https://gist.github.com/VictoriaC1/6cea376d5ac35c4eb33484ce7afe6c43) using D3 utilities & React to render data