Skip to main content
Public

Share visualization

Loading preview…

fork of pie chart-prathima

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

fork of pie chart-prathima

0
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.

Comments

Sign in to join the discussion.

MIT Licensed