1. Home
  2. Functions
  3. Information
  4. SPARKLINE

SPARKLINE function

Draws a small chart (line, column, win/loss or bar) inside the cell from a row or column of numbers.

Syntax

=SPARKLINE(data, [options])

Arguments

ArgumentRequiredDescription
dataRequiredThe numbers to chart
optionsOptionalOptional settings as pairs, like {"charttype","column";"color","#15803d"}. Settings: charttype (line, column, winloss, bar), color, negcolor, highcolor, lowcolor, firstcolor, lastcolor, max, min, linewidth, axis, rtl, empty (zero or ignore)

How to use SPARKLINE

SPARKLINE takes 1 required argument and 1 optional argument. Type =SPARKLINE( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=SPARKLINE({1,3,2,5})Result "" (empty text)
=SPARKLINE({1,-2,3},{"charttype","winloss"})Result "" (empty text)

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.