Creates a bar chart from sheet data.
class Charts method .newBarChart()
Charts is the Apps Script service.
.newBarChart() is the method name you will see after a dot in your code.
What it does
Why it's used
- Compare categories side by side on a report sheet.
- Show survey or sales breakdowns visually.
Common errors
- Forgetting parentheses on newBarChart. Write Charts.newBarChart(), not Charts.newBarChart or newBarChart by itself.
- Skipping dots between chained calls. Each step needs a dot, like Charts.newBarChart().
- Adding spaces where they do not belong. Write Charts.newBarChart(), not Charts .newBarChart(), Charts.newBarChart (), or Charts . newBarChart().
- Wrong capitalization. Use Charts and newBarChart, not charts or newbarchart.
Explore
Related methods
-
.newTableChart()
Creates a table chart from sheet data.
-
.newLineChart()
Creates a line chart from sheet data.
-
.newPieChart()
Creates a pie 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.newBarChart().
How to Make a Bar Chart Race From Google Sheets
Google Sheets can't animate charts, but it can do the hard part. Build a bar chart race with paste-ready formulas, then export a free video.
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 →