0
0
Google Sheetsspreadsheet~10 mins

Chart editor panel 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 open the chart editor panel in Google Sheets.

Google Sheets
var chart = sheet.newChart().setChartType(Charts.ChartType.[1]).build();
Drag options to blanks, or click blank then click option'
ATEXT
BBAR
CIMAGE
DFORM
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid chart types like TEXT or IMAGE which are not chart types.
Leaving the chart type blank.
2fill in blank
medium

Complete the code to set the chart title in the chart editor panel.

Google Sheets
chart = chart.modify().setOption('title', [1]).build();
Drag options to blanks, or click blank then click option'
A'Sales Data'
B123
Ctrue
Dnull
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers or booleans instead of a string for the title.
Forgetting to put quotes around the title text.
3fill in blank
hard

Fix the error in the code to correctly add a range of data to the chart editor panel.

Google Sheets
chart = chart.modify().addRange(sheet.getRange([1])).build();
Drag options to blanks, or click blank then click option'
A'A1:B10'
BA1:B10
Csheet.getRange('A1:B10')
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the range without quotes causing syntax errors.
Passing the range as a variable instead of a string.
4fill in blank
hard

Fill both blanks to set the chart type and enable the legend in the chart editor panel.

Google Sheets
chart = chart.modify().setChartType(Charts.ChartType.[1]).setOption('legend', [2]).build();
Drag options to blanks, or click blank then click option'
ALINE
Btrue
Cfalse
DCOLUMN
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid chart types.
Setting legend to a string instead of a boolean.
5fill in blank
hard

Fill all three blanks to create a pie chart, set the title, and disable the legend in the chart editor panel.

Google Sheets
chart = sheet.newChart().setChartType(Charts.ChartType.[1]).setOption('title', [2]).setOption('legend', [3]).build();
Drag options to blanks, or click blank then click option'
ABAR
B'Monthly Sales'
Cfalse
DPIE
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong chart types like BAR for a pie chart.
Not quoting the title string.
Using string 'false' instead of boolean false.