Skip to main content
100%

White Hat Pie Chart

✓ Published0🌍 Public
PPranay Matalia
Last edited Apr 26, 2022
Created on Apr 26, 2022
Forked from HTML Starter

This example creates a white-themed pie chart that displays a categorical dataset with labeled slices. The code uses D3.js v6 to build an SVG visualization, generating arcs with the `d3.pie` and `d3.arc` functions, and colors each slice using a `d3.scaleOrdinal` with `d3.schemeSet2`. Slice labels are positioned at arc centroids via `arcGenerator.centroid()`. The chart is rendered inside a React-friendly structure, with data defined as a simple object mapping group names to values.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes