SpreadJS Documentation
add2ScaleRule Method
The minimum scale type.
The minimum scale value.
The minimum 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 GcSpread.Sheets.Range.
Adds the two scale rule to the rule collection.
Syntax
var instance = new GcSpread.Sheets.ConditionalFormats(worksheet);
var value; // Type: object
value = instance.add2ScaleRule(minType, minValue, minColor, maxType, maxValue, maxColor, ranges);
function add2ScaleRule( 
   minType : ScaleValueType,
   minValue : object,
   minColor : string,
   maxType : ScaleValueType,
   maxValue : object,
   maxColor : string,
   ranges : Array
) : object;

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.
ranges
The cell ranges where the rule is applied whose item type is GcSpread.Sheets.Range.

Return Value

The two scale rule added to the rule collection.
Example
This example uses the add2ScaleRule method.
activeSheet.setValue(0,0, 1,3);
activeSheet.setValue(1,0, 50,3);
activeSheet.setValue(2,0, 100,3);
activeSheet.getConditionalFormats().add2ScaleRule(1, 10, "red", 2, 100, "yellow", [new GcSpread.Sheets.Range(0, 0, 10, 3)]);
See Also

Reference

ConditionalFormats type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.