# LOLLIPOPVARISPARKLINE

## Content

This function returns a data set used for representing a lollipop variance sparkline.

## Syntax

`LOLLIPOPVARISPARKLINE(plannedValue, actualValue, index, [absolute, reference, mini, maxi, tickUnit, legend, colorPositive, colorNegative, lollipopHeaderColor, vertical])`

## Arguments

| Argument | Description |
| -------- | ----------- |
| *plannedValue* | A number, array, or reference that represents the planned values. |
| *actualValue* | A number, array, or reference that represents the actual values. |
| *index* | A number or reference that specifies the zero-based index of the value to display. For a horizontal sparkline, it represents the row index. For a vertical sparkline, it represents the column index. |
| *absolute* | (Optional) A Boolean value that indicates whether to display the absolute variance. <br>If false, the variance is calculated as `(actualValue - plannedValue) / plannedValue`. <br>If true, the variance is calculated as `actualValue - plannedValue`. The default value is false. |
| *reference* | (Optional) A number or reference that represents the reference value for a relative variance sparkline. The default value is 0. This argument does not apply when *absolute* is true. |
| *mini* | (Optional) A number or reference that represents the minimum value displayed by a relative variance sparkline. Values below the minimum are limited to the minimum and indicated by an arrow. The default value is -1. This argument does not apply when *absolute* is true. |
| *maxi* | (Optional) A number or reference that represents the maximum value displayed by a relative variance sparkline. Values above the maximum are limited to the maximum and indicated by an arrow. The default value is 1. This argument does not apply when *absolute* is true. |
| *tickUnit* | (Optional) A number or reference that represents the interval between tick marks. The default value is 0. |
| *legend* | (Optional) A Boolean value that indicates whether to display the variance value. The default value is false. |
| *colorPositive* | (Optional) A string that represents the color used when the variance is greater than the reference value. The default value is "green". |
| *colorNegative* | (Optional) A string that represents the color used when the variance is less than the reference value. The default value is "red". |
| *lollipopHeaderColor* | (Optional) A string that represents the fill color of the lollipop head. The default value is "black". |
| *vertical* | (Optional) A Boolean value that indicates whether to display the sparkline vertically. The default value is false. |

## Data Types

Returns sparkline.

## Examples

```JavaScript
=LOLLIPOPVARISPARKLINE($B$2:$B$8,$C$2:$C$8,0,FALSE,0,-1,1,0.1,TRUE,"green","red","black",FALSE)
```

>type=note
> **Note:** For an overview of Lollipop Variance sparklines, including elements, supported options and a usage scenario, see [Lollipop Variance Sparkline](/spreadjs/docs/features/sparkmain/lollipop-variance-sparkline).