SpreadJS Documentation
ThreeScaleRule Constructor
The minimum scale type.
The minimum scale value.
The minimum scale color.
The midpoint scale type.
The midpoint scale value.
The midpoint scale color.
The maximum scale type.
The maximum scale value.
The maximum scale color.
Represents a three-color scale conditional rule with the specified parameters.
Syntax
var instance = new GcSpread.Sheets.ThreeScaleRule(minType,
                                                 minValue,
                                                 minColor,
                                                 midType,
                                                 midValue,
                                                 midColor,
                                                 maxType,
                                                 maxValue,
                                                 maxColor);
function ThreeScaleRule( 
   minType : ScaleValueType,
   minValue : object,
   minColor : string,
   midType : ScaleValueType,
   midValue : object,
   midColor : string,
   maxType : ScaleValueType,
   maxValue : object,
   maxColor : string
) : ThreeScaleRule;

Parameters

minType
The minimum scale type.
minValue
The minimum scale value.
minColor
The minimum scale color.
midType
The midpoint scale type.
midValue
The midpoint scale value.
midColor
The midpoint scale color.
maxType
The maximum scale type.
maxValue
The maximum scale value.
maxColor
The maximum scale color.
Example
This example creates a three scale rule.
var scale = new GcSpread.Sheets.ThreeScaleRule();
scale.setMidpointColor("red");
scale.setMidpointType(0);
scale.setMidpointValue(50);
scale.setMaximumColor("blue");
scale.setMaximumType(2);
scale.setMaximumValue(100);
scale.setMinimumColor("yellow");
scale.setMinimumType(1);
scale.setMinimumValue(10);
scale.ranges = [new GcSpread.Sheets.Range(0, 0, 10, 3)];
activeSheet.getConditionalFormats().addRule(scale);
activeSheet.setValue(0,0, 1,3);
activeSheet.setValue(1,0, 50,3);
activeSheet.setValue(2,0, 100,3);
See Also

Reference

ThreeScaleRule class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.