Skip to main content
100%

Pie Chart 2

✓ Published0🌍 Public
PPathan Khuvanejarkhan
Last edited Jan 28, 2023
Created on Jan 28, 2023
Forked from HTML Starter

This example displays a pie chart with four equal slices, each filled with a different color from a CSV dataset loaded via D3’s `csv` method. Built with React 18 and rendered as SVG, the chart uses `d3.arc` with an inner radius of zero and an outer radius of 200 to generate the paths. The slices are positioned by calculating start and end angles for each quarter, and hovering scales the arcs via CSS transitions. The data source is a static CSV fetched from a GitHub gist.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes