Creates a pie chart from sheet data.
class Charts method .newPieChart()
Charts is the Apps Script service.
.newPieChart() is the method name you will see after a dot in your code.
What it does
Why it's used
- Show share-of-total for expenses or ticket types.
- Simple part-to-whole view for executives.
Common errors
- Forgetting parentheses on newPieChart. Write Charts.newPieChart(), not Charts.newPieChart or newPieChart by itself.
- Skipping dots between chained calls. Each step needs a dot, like Charts.newPieChart().
- Adding spaces where they do not belong. Write Charts.newPieChart(), not Charts .newPieChart(), Charts.newPieChart (), or Charts . newPieChart().
- Wrong capitalization. Use Charts and newPieChart, not charts or newpiechart.
Explore
Related methods
-
.newTableChart()
Creates a table chart from sheet data.
-
.newBarChart()
Creates a bar chart from sheet data.
-
.newLineChart()
Creates a line chart from sheet data.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about Charts.newPieChart().
Getting Started in Google Sheets Spreadsheet Management
Users can also customize the appearance of their spreadsheets with different fonts, colors, and themes.
Read post →How to Change Border Colors in Google Sheets with Apps Script
Recolor only the borders you already have in Google Sheets, with a hex code prompt, a reset button, and a custom menu. The real Apps Script from Big Year Premium, explained step by step.
Read post →How to Make a Gantt Chart in Google Sheets (and When Not To)
Make a simple Gantt chart in Google Sheets with one conditional formatting rule, try the timeline and sparkline options, and see when a year view fits.
Read post →