0
0
Google Sheetsspreadsheet~10 mins

Column and bar charts in Google Sheets - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a column chart from data in range A1:B5.

Google Sheets
InsertChart().setChartType(Charts.ChartType.[1]).setRange('A1:B5').build()
Drag options to blanks, or click blank then click option'
ALINE
BBAR
CCOLUMN
DPIE
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing BAR instead of COLUMN will create horizontal bars, not vertical.
Selecting PIE or LINE chart types will not produce column charts.
2fill in blank
medium

Complete the code to set the chart title to 'Sales Data'.

Google Sheets
chartBuilder.setOption('title', [1])
Drag options to blanks, or click blank then click option'
A'Sales Data'
B"Sales Data"
CSales Data
DSales_Data
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the title text causes errors.
Using unquoted text is treated as a variable, causing failure.
3fill in blank
hard

Fix the error in the code to set the chart's horizontal axis title to 'Month'.

Google Sheets
chartBuilder.setOption('hAxis.title', [1])
Drag options to blanks, or click blank then click option'
Amonth
B"Month"
C'Month'
DMonth
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted text causes errors.
Using single quotes may work but double quotes are preferred in scripts.
4fill in blank
hard

Fill both blanks to create a bar chart with the legend positioned at the bottom.

Google Sheets
chartBuilder.setChartType(Charts.ChartType.[1]).setOption('legend.position', [2])
Drag options to blanks, or click blank then click option'
ABAR
BCOLUMN
C'bottom'
D'top'
Attempts:
3 left
💡 Hint
Common Mistakes
Using COLUMN instead of BAR creates vertical bars.
Not quoting the legend position causes errors.
5fill in blank
hard

Fill all three blanks to create a column chart, set the title to 'Revenue', and position the legend on the right.

Google Sheets
chartBuilder.setChartType(Charts.ChartType.[1]).setOption('title', [2]).setOption('legend.position', [3])
Drag options to blanks, or click blank then click option'
ABAR
B"Revenue"
C'right'
DCOLUMN
Attempts:
3 left
💡 Hint
Common Mistakes
Using BAR instead of COLUMN changes the chart orientation.
Not quoting title or legend position causes errors.