Fork of Fork of Fork to pie chart
✓ Published0🌍 Public
This example visualizes cereal ratings as a pie chart using the Chart.js library, rendering each cereal’s rating as a slice on an HTML canvas. It fetches a CSV dataset from a GitHub gist, parses the rows to extract cereal names and their rating values, then feeds those into the chart with a custom color palette. The chart is configured to be responsive while maintaining a fixed aspect ratio, and it displays a title above the visualization. The code explicitly uses the `Chart` constructor with the `type: 'pie'` option, along with canvas 2D context, to draw the final output.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed