SpreadJS 13
GC.Spread.Sheets.ConditionalFormatting Namespace / ConditionalFormats type / add3ScaleRule Method
The minimum scale type.
The minimum scale value.
The minimum scale color.
The midpoint scale type.
The midpoint scale value.
The midpoint scale color.
The maximum scale type.
The maximum scale value.
The maximum scale color.
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
In This Topic
    add3ScaleRule Method
    In This Topic
    Adds the three scale rule to the rule collection.
    Syntax
    var instance = new GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats(worksheet);
    var value; // Type: ConditionRuleBase
    value = instance.add3ScaleRule(minType,
                                   minValue,
                                   minColor,
                                   midType,
                                   midValue,
                                   midColor,
                                   maxType,
                                   maxValue,
                                   maxColor,
                                   ranges);
    function add3ScaleRule( 
       minType : ScaleValueType,
       minValue : number,
       minColor : string,
       midType : ScaleValueType,
       midValue : number,
       midColor : string,
       maxType : ScaleValueType,
       maxValue : number,
       maxColor : string,
       ranges : undefined
    ) : ConditionRuleBase;

    Parameters

    minType
    The minimum scale type.
    minValue
    The minimum scale value.
    minColor
    The minimum scale color.
    midType
    The midpoint scale type.
    midValue
    The midpoint scale value.
    midColor
    The midpoint scale color.
    maxType
    The maximum scale type.
    maxValue
    The maximum scale value.
    maxColor
    The maximum scale color.
    ranges
    The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.

    Return Value

    The three scale rule added to the rule collection.
    Example
    This example uses the add3ScaleRule method.
    activeSheet.setValue(0,0, 1,3);
    activeSheet.setValue(1,0, 50,3);
    activeSheet.setValue(2,0, 100,3);
    activeSheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", [new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
    See Also