Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading_data_w_React

Public visualization

Loading_data_w_React

0 stars0🌍 Public
Ssagar limbu
Last edited May 30, 2022
Created on May 30, 2022
Forked from React Starter

This visualization displays the CSS named colors as a full-circle pie chart, with each color represented by a wedge around a central point. The data is loaded from a CSV file hosted in a GitHub Gist using D3's `csv` function, then fed into D3's `pie` layout with a static value of 1 per record. The resulting arcs are drawn as SVG `<path>` elements, filled with each row’s `RGB hex value` and positioned using a `d3.arc` generator with an inner radius of zero and an outer radius equal to the canvas width. React manages the state and rendering, showing a loading message until the asynchronous data fetch completes.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed