# GAUGEKPISPARKLINE

## Content

This function returns a data set used for representing a gauge KPI sparkline.

## Syntax

`GAUGEKPISPARKLINE(targetValue, currentValue, minValue, maxValue, [showLabel, targetValueLabel, currentValueLabel, minValueLabel, maxValueLabel, fontArray, minAngle, maxAngle, radiusRatio, gaugeType, colorRange])`

## Arguments

| Argument | Description |
| -------- | ----------- |
| *targetValue* | The target value of the gauge KPI sparkline. The target value is between minValue and maxValue. |
| *currentValue* | The current value of the gauge KPI sparkline. The current value is between minValue and maxValue. |
| *minValue* | The minimum value of the gauge KPI sparkline. The minValue is less than maxValue. |
| *maxValue* | The maximum value of the gauge KPI sparkline. The maxValue is more than minValue. |
| *showLabel* | (Optional) Specifies whether to show the label of all the values provided in the sparkline.<ul><li>If false, it will not show labels.</li><li>If true, it will only show the labels which fit inside the cell width and height. The cell should have enough width and height to show both graph and labels.</li></ul>The default value is true. |
| *targetValueLabel* | (Optional) The string to display as target value label. The default value is *targetValue*. |
| *currentValueLabel* | (Optional) The string to display as current value label. The default value is *currentValue*. |
| *mintValueLabel* | (Optional) The string to display as minimum value label. The default value is *minValue*. |
| *maxValueLabel* | (Optional) The string to display as maximum value label. The default value is *maxValue*. |
| *fontArray* | (Optional) Array contains font format as string items for the four label types -<ul><li>Target value label: Default value "16px Calibri"</li><li>Current value label: Default value "bold 22px Calibri"</li><li>Minimum and Maximum value labels: Default value "12px Calibri"</li></ul>The *showLabel* option must be true. |
| *minAngle* | (Optional) The minimum angle value of circle type. The *minAngle* should be less than *maxAngle*.<br>The angle values correspond to the time in the clock. 0 is 12 o'clock, -90 is 9 o'clock, 90 is 3 o'clock, and -180/180 is 6 o'clock.<br>The default value is -90.<br>The *gaugeType* option must be 0 (circle type). |
| *maxAngle* | (Optional) The maximum angle value of circle type. The *maxAngle* should be bigger than *minAngle*.<br>The angle values correspond to the time in the clock. 0 is 12 o'clock, -90 is 9 o'clock, 90 is 3 o'clock, and -180/180 is 6 o'clock.<br>The default value is 90.<br>The *gaugeType* option must be 0 (circle type). |
| *radiusRatio* | (Optional) The value is calculated as the ratio of inner circle radius and outer circle radius. The outer circle radius value is decided by the cell size.<br>The value ranges between 0 and 1. The default value is 0.<br>The *gaugeType* option must be 0 (circle type). |
| *gaugeType* | The KPI sparkline type.<br>0 - Circle<br>1 - Vertical Bar<br>2 - Horizontal Bar<br>The default type is circle. |
| *colorRange* | (Optional) The color range between the following specified values - *startValue, endValue, color\_string.*<br>Where *startValue* is the starting value in a range, *endValue* is the ending value in a range, and the *color\_string* is the color of the range between the two specified value.<br>The *startValue* must be less than the *endValue* and both the values should be between *minValue* and *maxValue*.<br>The default color range from *minValue* to *maxValue* is filled with light gray color. |

## Data Types

Returns sparkline.

## Examples

```JavaScript
sheet1.setFormula(1, 0, '=GAUGEKPISPARKLINE(Sheet2!B2,Sheet2!C2,Sheet2!D2,Sheet2!E2,TRUE,TEXT(Sheet2!B3/1000,"$0.0K"),Sheet2!A2,TEXT(Sheet2!D2/1000,"$0.0K"),TEXT(Sheet2!E2/1000,"$0.0K"),{"normal normal 11pt Calibri","normal bold 16pt Calibri","normal normal 9pt Calibri","normal normal 9pt Calibri"},-90,90,0.4,0,{0,1200,"#FFB2BD"},{1200,1500,"#FFDFB0"},{1500,2000,"#BCEAB4"})');
```