Skip to main content
100%

Reusable Pie Chart – ICE7

✓ Published3🌍 Public
Jjanisha30gowda@gmail.com
Last edited Oct 24, 2025
Created on Oct 24, 2025
Forked from D3 Starter

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 description
MIT Licensed

Similar vizzes