Fork of PieChart for Activity 7.1
✓ Published2🌍 Public
This example displays the distribution of iris flower species using a pie chart, with counts for setosa, versicolor, and virginica plotted from a CSV file fetched via a Gist URL. The chart, rendered on a Canvas element, uses Chart.js to draw the pie slices with distinct colors and a custom tooltip that labels each segment with its flower count. The code parses the CSV data line-by-line and counts species occurrences before passing the aggregated values to the chart library, which is configured with a fixed, non-responsive size.
AI-generated descriptionMIT Licensed