Skip to main content
100%

Activity7:Questions:1

✓ Published2🌍 Public
Ssaivaishnogaruda@gmail.com
Last edited Nov 1, 2024
Created on Nov 1, 2024

This pie chart shows the distribution of fuel types among a small dataset of used cars, grouping sixteen vehicles by their fuel category: Petrol, Diesel, and CNG. Built with the Chart.js library, the code computes the count of each fuel type using a reduce function over an in-memory JavaScript array of car objects, then renders the result to a canvas element with a distinct color per fuel type. The chart displays a legend and titled heading, with a responsive layout that centers the visualization on the page.

AI-generated description
MIT Licensed

Similar vizzes