🌍 Public
Viewing a saved revision (read-only)
2f28d326b7494a07a9f8b7ef5dd4b81b
test
This pie chart visualizes the distribution of fruit consumption categories, with each slice representing a genre's value from data loaded via `d3.csv` from a remote CSV file. The chart uses `d3.pie()` to compute arc angles and `d3.arc()` to generate SVG path shapes, with `d3.scaleOrdinal` assigning categorical colors. Interactive tooltips appear via appended `title` elements, while value labels are positioned at each arc's centroid using `arcPath.centroid()`. A legend and title are rendered within the 600×600 SVG, demonstrating a reusable pie chart function.
AI-generated descriptionA demonstration of pie chart