Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity7:Questions:1

Public visualization

Viewing a saved revision (read-only)

e27197a1284846409535ca5857f1d3e6

Activity7:Questions:1

0 stars2🌍 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