SpreadJS Documentation
TwoScaleRule class
Represents a two-color conditional scale rule with the specified parameters.
Syntax
var instance = new GcSpread.Sheets.TwoScaleRule(minType, minValue, minColor, maxType, maxValue, maxColor);
function TwoScaleRule;
Example
This example creates a rule.
var style = new GcSpread.Sheets.Style();
style.backColor = "red";
var rule = new GcSpread.Sheets.TwoScaleRule(GcSpread.Sheets.ScaleValueType.Number,1,"Yellow",GcSpread.Sheets.ScaleValueType.Number,50,"Blue");
rule.ranges=[new GcSpread.Sheets.Range(0,0,20,1)];
sheet.getConditionalFormats().addRule(rule);
sheet.setValue(0,0,1,3);
sheet.setValue(1,0,45,3);
Inheritance Hierarchy

Object
   GcSpread.Sheets.ScaleRule
      GcSpread.Sheets.TwoScaleRule

Constructors
 NameDescription
public ConstructorTwoScaleRule ConstructorRepresents a two-color conditional scale 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 a specified value of the rule if the cell satisfies the condition.  
public MethodgetExpected (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodgetMaximumColorGets the maximum color scale.  
public MethodgetMaximumTypeGets the maximum scale type.  
public MethodgetMaximumValueGets the maximum scale value.  
public MethodgetMinimumColorGets the minimum scale color.  
public MethodgetMinimumTypeGets the type of minimum scale.  
public MethodgetMinimumValueGets the minimum scale value.  
public Methodintersects (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodpriority (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodresetResets the rule.  
public MethodsetMaximumColorSets the maximum color scale.  
public MethodsetMaximumTypeSets the maximum scale type.  
public MethodsetMaximumValueSets the maximum scale value.  
public MethodsetMinimumColorSets the minimum scale color.  
public MethodsetMinimumTypeSets the type of minimum scale.  
public MethodsetMinimumValueSets the minimum scale value.  
public MethodstopIfTrue (Inherited from GcSpread.Sheets.ScaleRule)
Top
See Also

Reference

GcSpread.Sheets Namespace
Using the Scale Rule

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.