Reusable Pie Chart – ICE7
✓ Published3🌍 Public
This example shows a reusable pie chart that visualizes the average sepal length for three flower types—Rose, Tulip, and Lily—from a CSV dataset. The chart groups the raw data using `d3.rollup` to compute means, then renders slices with `d3.pie` and `d3.arc` within an SVG. A color scale from `d3.scaleOrdinal` maps categories to colors, and a legend is added for identification. The implementation follows a modular function structure, loading D3 v7 via an ES module import.
AI-generated descriptionMIT Licensed