0
0
Google Sheetsspreadsheet~10 mins

Moving charts to separate sheets 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 chart from data in range A1:B5.

Google Sheets
var chart = sheet.newChart().setChartType(Charts.ChartType.LINE).addRange(sheet.getRange([1])).build();
Drag options to blanks, or click blank then click option'
A"C1:D5"
B"B1:C5"
C"A1:B5"
D"A2:B6"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a range outside the data area, like B1:C5.
2fill in blank
medium

Complete the code to move the chart to a new sheet named 'ChartSheet'.

Google Sheets
var chartSheet = spreadsheet.[1]('ChartSheet');
chartSheet.insertChart(chart);
Drag options to blanks, or click blank then click option'
AgetSheetByName
BinsertSheet
CdeleteSheet
DcopySheet
Attempts:
3 left
💡 Hint
Common Mistakes
Using getSheetByName which only gets existing sheets.
3fill in blank
hard

Fix the error in the code to move the chart to a new sheet.

Google Sheets
var newSheet = spreadsheet.insertSheet('ChartSheet');
newSheet.[1](chart);
Drag options to blanks, or click blank then click option'
AinsertChart
BaddChart
CappendChart
DcreateChart
Attempts:
3 left
💡 Hint
Common Mistakes
Using addChart which does not exist.
4fill in blank
hard

Fill both blanks to create a chart and move it to a new sheet named 'SalesChart'.

Google Sheets
var chart = sheet.newChart().setChartType(Charts.ChartType.COLUMN).addRange(sheet.getRange([1])).build();
var chartSheet = spreadsheet.[2]('SalesChart');
chartSheet.insertChart(chart);
Drag options to blanks, or click blank then click option'
A"A1:B10"
BinsertSheet
CgetSheetByName
D"B1:C10"
Attempts:
3 left
💡 Hint
Common Mistakes
Using getSheetByName instead of insertSheet for new sheet.
5fill in blank
hard

Fill all three blanks to create a pie chart from range C1:D7 and move it to a new sheet named 'PieChart'.

Google Sheets
var chart = sheet.newChart().setChartType(Charts.ChartType.[1]).addRange(sheet.getRange([2])).build();
var chartSheet = spreadsheet.[3]('PieChart');
chartSheet.insertChart(chart);
Drag options to blanks, or click blank then click option'
APIE
B"C1:D7"
CinsertSheet
DLINE
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing wrong chart type or using getSheetByName instead of insertSheet.