Sparkline

Tiny inline trend. What the sparkline is for, the data it needs and every option it has.

4 min read

On this page

Tiny inline trend. It sits in the Time series group of the widget library.

Example sparkline on a BankSync dashboard
An example sparkline drawn with sample data. Hover for values and switch between examples.

When to use it#

Use a sparkline to show the shape of a trend with no axes or gridlines, such as your account balance over the last 90 days or weekly spending this quarter. The last point is marked; you can also mark the high, low and average.

When to pick something else#

  • Readers need actual values, dates and axes? Use a Line chart or Area chart.
  • Just the current number? Use a KPI, which can carry its own small trend line.

The data it needs#

Pick these in the Data tab of the inspector. BankSync suggests a column for each when your source has an obvious match.

FieldNeededPickNotes
X axisYesa category or a date
Y axisYesa number
SeriesOptionala category
ColorOptionala category

Rows that share a category are combined before drawing: choose Sum, Average, Count, Min or Max on the value field. See Binding data.

Sparkline options#

Set these on the Style tab of the inspector. "Automatic" means BankSync picks a value from the chart's size and data.

OptionWhat it doesValuesNew charts start with
Sparkline styleLine, area or bars. Win-loss draws bars above and below the baseline in separate colours for gains and losses.Line, Area, Bar, Win lossLine
ColourColour of the line, fill or bars. Leave empty to use the palette.ColourAutomatic
Fill opacityHow solid the fill is in the area style, from 0 (clear) to 1 (solid).Number, 0 to 1Automatic
Line widthThickness of the line, in pixels.Number, 0 or moreAutomatic
Smooth lineDraw a gentle curve instead of straight segments. On by default.On or offAutomatic
Mark latest valuePut a dot on the most recent value. On by default.On or offAutomatic
Mark high and lowPut markers on the highest and lowest values.On or offAutomatic
Show average lineDraw a faint line at the average value.On or offAutomatic
Show valueWrite the latest value at the end of the sparkline. Not shown in the win-loss style.On or offAutomatic
Show axisShow the first and last x labels under the sparkline when there is room.On or offAutomatic
Positive colourColour of the up bars in the win-loss style.ColourAutomatic
Negative colourColour of the down bars in the win-loss style.ColourAutomatic

Needs history#

Show a note instead of the chart until the rows cover enough periods, so a first week never reads as a trend.

OptionWhat it doesValuesNew charts start with
Date fieldThe date column whose distinct periods are counted.TextAutomatic
PeriodWhat counts as one period: a day, week, month, quarter or year.Day, Week, Month, Quarter, YearAutomatic
Periods neededHow many distinct periods the rows must cover before the chart draws (2 to 60).Whole number, 2 to 60Automatic
Waiting messageShown until there is enough history. Leave empty for a message naming the periods.Text, up to 120 charactersAutomatic

Shared chart styling#

Every chart also has the shared styling options. These apply to this one:

Messy data#

  • Values for the same period are added together.
  • Points are spaced evenly in the order they arrive, not by calendar date. A month with no rows is skipped rather than shown as a gap, so pick a time bucket and make sure every period has data.
  • A period whose value is blank breaks the line into two pieces instead of dropping to zero.
  • The vertical scale runs from the lowest value to the highest, not from zero, so small movements can look dramatic.
  • A single point is drawn as a dot with its value next to it. No numbers at all shows "No value".

On a phone#

Sparklines get three rows on phones and read well at any width. They are one of the best choices for a narrow card.

Use this page with your AI assistant

Every BankSync doc is available as plain Markdown for agents and LLMs.