Skip to main content

Line Sparklines

Line sparklines are compact charts that display trends across a series of data points. Each point on the line corresponds to a value, and the connecting lines reveal patterns such as increases, decreases, or fluctuations. Because they fit in a single cell, line sparklines are ideal for comparing trends across multiple rows or columns.

When to use line sparklines

  • Tracking changes over time: Visualize how values evolve across a continuous period, such as sales, temperature, or performance metrics.
  • Comparing trends side by side: Display sparklines to compare trends across categories or time frames within a compact layout.
  • Highlighting overall patterns: Emphasize general movement and turning points without needing full chart detail or axis labels.

Create a line sparkline

  1. On the Insert tab, select Sparklines.
  2. Under Line Sparkline, select Insert Line Sparkline. The Create Sparklines dialog opens.
  3. In Data Range, select a continuous range of cells (in the same row or column).
  4. In Location Range, select the cell where the sparkline will appear.
  5. Uncheck isFormulaSparkline if you do not want the sparkline to be saved as a formula. This removes the formula from the formula bar (fx) and enables the Sparkline ribbon controls.
  6. Click Ok. The sparkline is inserted into the selected cell.

Edit a line sparkline

Sparkline is saved as a formula

  1. Select the line sparkline in your workbook.
  2. On the Sparkline tab, select Settings. The CompatibleSparkline Setting dialog opens.
  3. Adjust the parameters, then click Ok.
  4. Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.

Sparkline is not saved as a formula

When the isFormulaSparkline option is unchecked during creation, the sparkline is no longer controlled by a formula. The Settings button is replaced by direct ribbon controls.

  1. Select the line sparkline in your workbook.
  2. Use the Sparkline tab to customize the sparkline:
    • Change the sparkline type (Line, Column, or Win/Loss).
    • Show or hide specific value points (first, last, high, low, negative).
    • Apply custom marker and axis styles.
    • Adjust sparkline and marker colors, and line thickness.
  3. To highlight values, enable the Markers option and select which points to display.

Line sparkline parameters

The line sparkline formula supports the following format:
=LINESPARKLINE(data, dataOrientation, dateAxisData, dateAxisOrientation, setting)

Data parameters

ParameterDescription
DataSpecifies the range containing sparkline data, such as A1:C3.
Data OrientationSpecifies the data orientation: Vertical or Horizontal.
DateAxisData(Optional) Sets the date axis range, such as D1:F3.
DateAxisOrientation(Optional) Specifies the sparkline date axis orientation: Vertical or Horizontal.
DisplayEmptyCellsAsSpecifies how to show empty cells: Gaps, Zero, or Connect.
Show data in hidden rows and columns(Optional) Enables display of data in hidden cells.

Show parameters

ParameterDescription
Show FirstHighlights the first data point using a different format.
Show LastHighlights the last data point using a different format.
Show HighApplies distinct formatting to the highest value.
Show LowApplies distinct formatting to the lowest value.
Show NegativeFormats negative values differently.
Show MarkersDisplay data markers for each sparkline.

Group parameters

ParameterDescription
MinAxisTypeDefines the minimum axis type: Individual or Custom.
ManualMinBecomes available when MinAxisType is set to Custom. Enter a value such as -3.
MaxAxisTypeDefines the maximum axis type: Individual or Custom.
ManualMaxBecomes available when MaxAxisType is set to Custom. Enter a value such as 5.
RightToLeftDisplays the group direction from right to left, instead of the default left to right.
Display XAxisShows or hides the X-axis for the group in the visualization.

Style parameters

ParameterDescription
Style SettingDefines the color or line weight for each visual element:

  • Negative – Color of the negative data points for each sparkline in this sparkline group.
  • Markers – Color of the data markers for each sparkline in this sparkline group.
  • Axis – Color of the axis.
  • Series – Color for each sparkline in this sparkline group.
  • High Marker – Color of the highest data point for each sparkline in this sparkline group.
  • Low – Color of the lowest data point for each sparkline in this sparkline group.
  • First Marker – Color of the first data point for each sparkline in this sparkline group.
  • Last Marker – Color of the last data point for each sparkline in this sparkline group.
  • Line Weight – Thickness of the line.