Bird
Raised Fist0
Google Sheetsspreadsheet~10 mins

Line charts in Google Sheets - Interactive Code Practice

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

Complete the code to create a line chart from data in cells A1 to B5.

Google Sheets
=SPARKLINE(A1:B5, {"charttype", [1])
Drag options to blanks, or click blank then click option'
A"line"
Bscatter
Cpie
Dbar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bar' or 'pie' instead of 'line' for the chart type.
Forgetting to put the chart type inside quotes.
2fill in blank
medium

Complete the code to set the line width to 2 for the line chart.

Google Sheets
=SPARKLINE(A1:B5, {"charttype", "line", "[1]", 2})
Drag options to blanks, or click blank then click option'
Acolor
Blegend
Clinewidth
Daxis
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'color' or 'legend' instead of 'linewidth'.
Not placing the linewidth option inside the options array.
3fill in blank
hard

Fix the error in the formula to correctly set the line color to blue.

Google Sheets
=SPARKLINE(A1:B5, {"charttype", "line", "color", [1])
Drag options to blanks, or click blank then click option'
ABlue
Bblue
C'blue'
D"blue"
Attempts:
3 left
💡 Hint
Common Mistakes
Using color names without quotes.
Using single quotes instead of double quotes.
4fill in blank
hard

Fill both blanks to create a line chart with a red line.

Google Sheets
=SPARKLINE(A1:B5, {"charttype", [1], "color", [2])
Drag options to blanks, or click blank then click option'
A"line"
B"red"
C"blue"
Dbar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bar' instead of 'line' for the chart type.
Not putting the color name in quotes.
5fill in blank
hard

Fill all three blanks to create a line chart with green color and line width of 3.

Google Sheets
=SPARKLINE(A1:B5, {"charttype", [1], "color", [2], "linewidth", [3])
Drag options to blanks, or click blank then click option'
A"line"
B"green"
C3
D"blue"
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the line width number.
Using wrong color names or missing quotes.

Practice

(1/5)
1. What is the main purpose of a Line chart in Google Sheets?
easy
A. To display data as separate categories with bars
B. To show how values change over time or order
C. To list data in a table format
D. To create a pie chart of percentages

Solution

  1. Step 1: Understand the purpose of line charts

    Line charts are used to show trends or changes over time or sequence.
  2. Step 2: Compare with other chart types

    Bar charts show categories, pie charts show parts of a whole, tables list data without trends.
  3. Final Answer:

    To show how values change over time or order -> Option B
  4. Quick Check:

    Line chart = show changes over time [OK]
Hint: Line charts track changes over time or order [OK]
Common Mistakes:
  • Confusing line charts with bar or pie charts
  • Thinking line charts show categories only
  • Using line charts for static data without order
2. Which of these is the correct way to insert a line chart in Google Sheets?
easy
A. Select data, then Insert > Chart, and choose Line chart
B. Right-click a cell and select 'Add Line Chart'
C. Type =LINECHART() in a cell
D. Use Format > Chart > Line chart

Solution

  1. Step 1: Recall the chart insertion steps

    In Google Sheets, you select your data, then go to Insert > Chart.
  2. Step 2: Choose the chart type

    After Insert > Chart, you pick Line chart from the Chart Editor.
  3. Final Answer:

    Select data, then Insert > Chart, and choose Line chart -> Option A
  4. Quick Check:

    Insert > Chart > Line chart = correct method [OK]
Hint: Use Insert menu to add charts, then pick Line chart [OK]
Common Mistakes:
  • Trying to insert charts via right-click menu
  • Typing formulas to create charts
  • Looking for chart options under Format menu
3. Given this data in A1:B4:
Date | Sales
Jan | 100
Feb | 150
Mar | 120

If you create a line chart with this data, what will the line show?
medium
A. Sales increasing from Jan to Feb, then decreasing in Mar
B. Sales staying constant across all months
C. Sales decreasing from Jan to Feb, then increasing in Mar
D. Sales values plotted as bars

Solution

  1. Step 1: Analyze the sales data values

    Sales are 100 in Jan, 150 in Feb, and 120 in Mar, so they rise then fall.
  2. Step 2: Understand line chart behavior

    The line connects points in order, showing increase from 100 to 150, then decrease to 120.
  3. Final Answer:

    Sales increasing from Jan to Feb, then decreasing in Mar -> Option A
  4. Quick Check:

    Line chart shows trend: up then down [OK]
Hint: Line charts connect points in order showing trends [OK]
Common Mistakes:
  • Assuming sales stay constant
  • Confusing line chart with bar chart
  • Ignoring the order of data points
4. You created a line chart but it shows only one data point instead of a line. What is the most likely cause?
medium
A. Your data has empty cells
B. You used the wrong chart type
C. You forgot to sort the data
D. You selected only one column of data instead of two

Solution

  1. Step 1: Check data selection for the chart

    Line charts need at least two columns: one for labels (like dates) and one for values.
  2. Step 2: Understand effect of selecting one column

    If only one column is selected, Google Sheets treats it as a single series without x-axis labels, showing one point.
  3. Final Answer:

    You selected only one column of data instead of two -> Option D
  4. Quick Check:

    Two columns needed for line chart data [OK]
Hint: Select both labels and values columns for line charts [OK]
Common Mistakes:
  • Selecting only values without labels
  • Choosing wrong chart type
  • Ignoring empty cells in data
5. You have monthly sales data for two products in columns A to C:
Month | Product A | Product B
Jan | 100 | 90
Feb | 150 | 120
Mar | 120 | 130

How do you create a line chart to compare both products' sales trends over time?
hard
A. Select Month and Product A columns only, then Insert > Chart
B. Select only Product A and Product B columns, then Insert > Chart
C. Select all three columns, then Insert > Chart and choose Line chart
D. Create two separate line charts, one for each product

Solution

  1. Step 1: Identify data needed for comparison

    You need the Month column for x-axis labels and both product columns for lines.
  2. Step 2: Select all three columns and insert line chart

    Selecting Month, Product A, and Product B lets Google Sheets plot two lines over the months.
  3. Final Answer:

    Select all three columns, then Insert > Chart and choose Line chart -> Option C
  4. Quick Check:

    Include labels and all series for comparison [OK]
Hint: Select labels and all data series to compare in one chart [OK]
Common Mistakes:
  • Omitting the Month column for x-axis
  • Selecting only one product column
  • Making separate charts instead of one combined
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard