How to build advanced SPARKLINE charts in Google Sheets
In Google Sheets (verified 2026-10-24), start with =SPARKLINE(range) then pass an options map — for example {"charttype","bar";"color","#1f5fbf";"min",0;"max",100} — to control chart type (line, bar, column, winloss), colours and axis scaling. Place sparklines beside KPI rows, or wrap a QUERY / FILTER result so each dashboard cell charts only the filtered series.
SPARKLINE is a free Sheets formula (not an Excel insert-object sparkline). Blank cells, text and permission-limited IMPORTRANGE sources are common failure points. Options keys are case-sensitive strings.
Applies to Google Sheets on the web (sheets.google.com). Mobile apps show formula results but editing options maps is easier on desktop. Excel has a separate Sparklines ribbon feature — see our Excel guide if you need that UI.
Tune SPARKLINE options for dashboards
Start from a clean range
- Put your numeric series in a single row or column.
- In the sparkline cell, enter
=SPARKLINE(A2:L2)and confirm a default line appears. - Freeze header rows so dashboard sparklines stay visible while you scroll.
Add an options map
- Extend the formula:
=SPARKLINE(A2:L2,{"charttype","column";"color","#1f5fbf"}). - Try
bar,column,winlossor keeplinefor trends. - Set
"min"/"max"(or"ymin"/"ymax"on line charts) so small changes do not exaggerate the scale.
Combine with QUERY or FILTER
- Wrap source data:
=SPARKLINE(QUERY(Data!A:C,"select C where A='West'",0)). - Or chart a FILTER spill:
=SPARKLINE(FILTER(B:B,A:A=E2)). - Copy the pattern down your KPI table and verify each sparkline tracks the right slice.
Our take: one option map per metric family
Reuse the same colour and max for every “conversion %” sparkline so the eye compares fairly across rows.
If it fails
- #N/A or blank: range is empty, all text, or FILTER returned no rows.
- Weird scale: set explicit min/max so one outlier does not flatten the rest.
- Wrong charttype: option keys must be quoted strings inside
{}. - Permission errors: IMPORTRANGE source not linked — open the source and Allow access.
Frequently asked questions
What is an advanced SPARKLINE in Sheets?
A SPARKLINE formula that uses an options map (chart type, colours, axis bounds) and often charts QUERY/FILTER results inside one cell.
How do I change SPARKLINE colour?
Pass {"color","#hex"} (or color1/color2 for winloss) as the second SPARKLINE argument.
SPARKLINE vs Insert chart?
SPARKLINE stays inside one cell for dense dashboards; Insert > Chart creates a floating chart object.
Can I sparkline data from another sheet?
Yes — reference Sheet2!A:A or QUERY another tab; for other files use IMPORTRANGE first.
Does SPARKLINE work offline?
Cached values may show; editing formulas needs Sheets online connectivity.