This is the most commonly used sparkline in the Sparkify collection.
By simply providing a list of numbers (number array), positive values will be displayed in bright green and negative numbers will be rendered bright red. The number of values this sparkline supports is presently unknown, but tests show it handles a few dozen with no issues.
In this example, SparkifyBar() contains a Coda List() featuring six monthly amount fields from the current row).
While the Sparkify output is a URL referencing the generated sparkline, this example displays the image because the formula is used in an image field with the height and width set as follows. These settings can be adjusted to suit your specific needs.
You can also use this formula with columnar data in a related table or even inline in a document body. For example,
Development Milestones and Satisfaction →
It’s a very simple task to set up sparklines everywhere they may be useful.
SparkifyPie
This is a slightly different type of sparkline intended to provide a binary assessment using to aggregate values - the first is rendered as green and the second is rendered in red. This sparkline is a simple indicator of the percent of a whole. It’s ideal as an inline sparkline or in table rows.
You can provide more than two values but since sparklines have no legend or slices key, it will not provide the usability of a full-blown pie chart.
SparkifyAI
This one is also variant the bar sparkline but is presently experimental. It uses the least squares method of predicting future values. Positive values are indicated in light green and future negative values are light red.
Setting these up is no different than SparkifyBar().
There will be new parameters and features coming soon for SparkifyAI.