🌍 Public
Viewing a saved revision (read-only)
94ebdd3f70474fc9bfff2e227e1f44fb
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.