SpreadJS Documentation
IconSetRule class
Represents an icon set rule with the specified parameters.
Syntax
var instance = new GcSpread.Sheets.IconSetRule(iconSetType);
function IconSetRule;
Example
This example creates a new icon set rule and sets the range and icon for it.
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,15,3);
activeSheet.setValue(2,0,25,3);
activeSheet.setValue(3,0,-1,3);
var cfs = activeSheet.getConditionalFormats();
var iconSetRule = new GcSpread.Sheets.IconSetRule();
iconSetRule.ranges =[new GcSpread.Sheets.Range(0,0,4,1)];
iconSetRule.iconSetType(GcSpread.Sheets.IconSetType.FourTrafficLights);
var iconCriteria = iconSetRule.iconCriteria();
iconCriteria[0] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 1);
iconCriteria[1] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 10);
iconCriteria[2] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 20);
iconSetRule.reverseIconOrder(false);
iconSetRule.showIconOnly(false);
cfs.addRule(iconSetRule);
Inheritance Hierarchy

Object
   GcSpread.Sheets.ScaleRule
      GcSpread.Sheets.IconSetRule

Constructors
 NameDescription
public ConstructorIconSetRule ConstructorRepresents an icon set rule with the specified parameters.  
Top
Fields
 NameDescription
public Fieldranges (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Fieldstyle (Inherited from GcSpread.Sheets.ConditionRuleBase)
Top
Methods
 NameDescription
public Methodcontains (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodevaluateReturns the specified value of the rule if the cell meets the condition.  
public MethodgetExpected (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodstatic (Shared in Visual Basic)getIconGets the icon based on the specific iconSetType and iconIndex.  
public MethodiconCriteriaGets the icon criteria.  
public MethodiconSetTypeGets or sets the type of icon set.  
public Methodintersects (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodpriority (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodresetResets the rule.  
public MethodreverseIconOrderGets or sets whether to reverse icon order.  
public MethodshowIconOnlyGets or sets whether to display the icon only.  
public MethodstopIfTrue (Inherited from GcSpread.Sheets.ScaleRule)
Top
See Also

Reference

GcSpread.Sheets Namespace
Using the Icon Set Rule

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.