SpreadJS Documentation
TwoScaleRule Constructor
The minimum scale type.
The minimum scale value.
The minimum scale color.
The maximum scale type.
The maximum scale value.
The maximum scale color.
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( 
   minType : ScaleValueType,
   minValue : any,
   minColor : string,
   maxType : ScaleValueType,
   maxValue : any,
   maxColor : string
) : TwoScaleRule;

Parameters

minType
The minimum scale type.
minValue
The minimum scale value.
minColor
The minimum scale color.
maxType
The maximum scale type.
maxValue
The maximum scale value.
maxColor
The maximum scale color.
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)];
activeSheet.getConditionalFormats().addRule(rule);
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,45,3);
activeSheet.setValue(2,0,75,3);
See Also

Reference

TwoScaleRule class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.