🌍 Public
Viewing a saved revision (read-only)
64c40d3560b149648fa4c3eeb1b9b4af
Pie Chart with Legend
A pie chart breaks categorical data from a CSV file into five colored slices, each labeled with a fruit name and accompanied by a custom HTML legend built from colored squares. The chart is rendered as SVG using D3.js v6, with the `d3.pie()` layout computing arc angles and `d3.arc()` generating the paths. The legend is positioned absolutely beside the chart, and each slice uses a semi-transparent fill with white strokes to visually separate segments.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.