Spread.NET 18 Formula Reference
Formula Functions / Functions D to G / GAUGEKPISPARKLINE
In This Topic
    GAUGEKPISPARKLINE
    In This Topic

    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

    This function has these 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.

    • If false, it will not show labels.
    • 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.

    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 -

    • Target value label: Default value "16px Calibri"
    • Current value label: Default value "bold 22px Calibri"
    • Minimum and Maximum value labels: Default value "12px Calibri"

    The showLabel option must be true.

    minAngle

    (Optional) The minimum angle value of circle type. The minAngle should be less than maxAngle.

    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.

    The default value is -90.

    The gaugeType option must be 0 (circle type).

    maxAngle

    (Optional) The maximum angle value of circle type. The maxAngle should be bigger than minAngle.

    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.

    The default value is 90.

    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.

    The value ranges between 0 and 1. The default value is 0.

    The gaugeType option must be 0 (circle type).

    gaugeType

    The KPI sparkline type.

    0 - Circle

    1 - Vertical Bar

    2 - Horizontal Bar

    The default type is circle.

    colorRange

    (Optional) The color range between the following specified values - startValue, endValue, color_string.

    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.

    The startValue must be less than the endValue and both the values should be between minValue and maxValue.

    The default color range from minValue to maxValue is filled with light gray color.

    Data Types

    Returns sparkline.

    Example

    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"})');