Fork of React + D3 Viz Starter
✓ Published0🌍 Public
A circular color wheel displays all 148 CSS named colors as equal-width arcs emanating from the center. The visualization loads its data from a CSV file listing named colors and their RGB hex values, then renders each arc using the d3.arc() function within a React component. As the user moves the mouse, the entire group of arcs rotates by an offset calculated from the cursor's x-position, creating an interactive feel. The code uses React hooks like useEffect and useMemo to manage data loading and arc generation.
AI-generated descriptionBoilerplate code for a React + D3 visualization with:
- CDN links for React, ReactDOM, and D3
- Basic React boilerplate
- Variables for dimensions and margins
- A
VizContainercomponent that:- Abstracts SVG/group container elements
- Follows the margin convention
- Show the margins, which can be easily removed by deleting the
showMargins={true} prop
MIT Licensed