🌍 Public
Viewing a saved revision (read-only)
e145c05fc7fa4b168266db92e54f8bd7
Fork of pie chart
This example shows a categorical distribution as a pie chart with a legend. It visualizes five categories with varying values, each slice labeled directly and represented by a distinct color in a separate legend. The chart is built using D3 v6, leveraging `d3.pie` and `d3.arc` generators to compute slice geometry, while `d3.scaleOrdinal` assigns the categorical color scheme. The SVG output is generated from hardcoded data, with the pie centered within a 500-pixel square and a custom-styled HTML legend positioned beside it.
AI-generated descriptionA demonstration of reusable scatter plot.
ISC Licensed