SpreadJS 13
GC.Spread.Sheets.ConditionalFormatting Namespace / ConditionalFormats type / addIconSetRule Method
The type of icon set.
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
In This Topic
    addIconSetRule Method
    In This Topic
    Adds an icon set rule to the rule collection.
    Syntax
    var instance = new GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats(worksheet);
    var value; // Type: ConditionRuleBase
    value = instance.addIconSetRule(iconSetType, ranges);
    function addIconSetRule( 
       iconSetType : IconSetType,
       ranges : undefined
    ) : ConditionRuleBase;

    Parameters

    iconSetType
    The type of icon set.
    ranges
    The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.

    Return Value

    The icon set rule added to the rule collection.
    Example
    This example uses the addIconSetRule method.
    activeSheet.setValue(0,0,1,3);
    activeSheet.setValue(1,0,15,3);
    activeSheet.setValue(2,0,25,3);
    activeSheet.setValue(3,0,-1,3);
    activeSheet.conditionalFormats.addIconSetRule(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights, [new GC.Spread.Sheets.Range(0,0,4,1)]);
    See Also