🌍 Public
Viewing a saved revision (read-only)
42ab7909e26146c1b7d5230239714141
Fork of PieChart for Activity 7.1
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 description