Complete the code to create a column chart from data in range A1:B5.
InsertChart().setChartType(Charts.ChartType.[1]).setRange('A1:B5').build()
The COLUMN chart type creates vertical bars, which is the standard column chart.
Complete the code to set the chart title to 'Sales Data'.
chartBuilder.setOption('title', [1])
Text strings in Google Sheets formulas and scripts must be enclosed in quotes. Single or double quotes work, here single quotes are correct.
Fix the error in the code to set the chart's horizontal axis title to 'Month'.
chartBuilder.setOption('hAxis.title', [1])
The axis title must be a string enclosed in quotes. Double quotes are standard in scripts.
Fill both blanks to create a bar chart with the legend positioned at the bottom.
chartBuilder.setChartType(Charts.ChartType.[1]).setOption('legend.position', [2])
Use BAR for horizontal bars and set legend position to 'bottom' as a string.
Fill all three blanks to create a column chart, set the title to 'Revenue', and position the legend on the right.
chartBuilder.setChartType(Charts.ChartType.[1]).setOption('title', [2]).setOption('legend.position', [3])
Use COLUMN for vertical bars, the title must be a quoted string, and the legend position a quoted string.