Skip to main content
100%

Task9_1.1

✓ Published0🌍 Public
Aamireddy.sw@gmail.com
Last edited Apr 21, 2024
Created on Apr 21, 2024
Forked from HTML Starter

This example shows the distribution of iris flower species as a pie chart, with each slice labeled by species name and count. The chart is rendered using D3 v7’s `d3.pie` and `d3.arc` to compute slice geometry, while `d3.rollup` aggregates the CSV data by species. A categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) fills the slices, and annotations are positioned using the arc generator’s `centroid` method. The SVG output includes a legend built with appended rectangles and text.

AI-generated description

A demonstration of reusable pie chart.

MIT Licensed

Similar vizzes