What is a pie chart?
A pie chart (or a circle chart) is a circular statistical graphic which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented.
Applications of Pie chart
- Pie charts are generally used to show percentage or proportional data of sales of different items in a business.
- Used in elections to show percentage of votes each party has recieved.
- Used in surveys to depict no of items in each category.
- Broadly used in database and excel sheets.
Follow the steps to add a google pie chart on a webpage:
Step 1 : Start with a simple basic web page.
Add a “div” element with the id “piechart”:
Step 2 : Adding a reference
Add a reference to the Chart API at google.com.
Explanation : The below code is used to load Google charts :
The below code is used to draw a chart and set the user specific values for each division :
The code below is used to display the chart inside the “div” element with id=”piechart” :
To get a 3d pie chart, set “is3d” option to true :
- How To Add Google Translate Button On Your Webpage?
- How to Add Apple's new San Francisco font on a Webpage using CSS ?
- How to add a custom right-click menu to a webpage ?
- How to insert Charts in New Google Sites ?
- Reading selected webpage content using Python Web Scraping
- Reader's View of a GeeksforGeeks webpage
- How to redirect to another webpage in HTML?
- How to connect multiple MySQL databases on a single webpage ?
- How to get title of a webpage using Selenium in Python?
- How to click a button on webpage using selenium ?
- How to Add Google Custom Search Engine in New Google Sites ?
- How to add Google Analytics in New Google Sites ?
- How To Add Google Maps With A Marker to a Website
- How to add Google map inside html page without using API key ?
- How to add Google map and Marker to your Application using AngularJS ?
- How to add custom google search bar inside your web-page?
- How to Add Google Locations Autocomplete to your Angular Application ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.