Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

fork of pie chart-prathima

Public visualization

Viewing a saved revision (read-only)

40136154b3b046bbba3ec394a9c8f01b

fork of pie chart-prathima

0 stars0🌍 Public
Ppilliprathimarani@my.unt.edu
Last edited Mar 28, 2024
Created on Mar 28, 2024

This example displays a pie chart of total sales by category, using data fetched from a Walmart CSV file hosted on GitHub. The chart.js library renders the visualization directly onto an HTML canvas element, with each category’s sales value mapped to a slice and colored using a predefined palette. The code loads the CSV, splits it into rows, and extracts the item category and total sales columns before constructing the chart with a title and non-responsive sizing. The rendering is entirely client-side, using the Canvas API through Chart.js.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.