SpreadJS Documentation
AverageConditionType Enumeration
Specifies the average condition type.
Members
MemberDescription
AboveSpecifies the above average condition.
Above1StdDevSpecifies the above standard deviation condition.
Above2StdDevSpecifies above the two standard deviation condition.
Above3StdDevSpecifies above the three standard deviation condition.
BelowSpecifies the below average condition.
Below1StdDevSpecifies the below standard deviation condition.
Below2StdDevSpecifies below the two standard deviation condition.
Below3StdDevSpecifies below the three standard deviation condition.
EqualOrAboveSpecifies the above average or equal average condition.
EqualOrBelowSpecifies the below average or equal average condition.
Example
This example creates an average rule.
activeSheet.setValue(0,0, 1,3);
activeSheet.setValue(1,0, 50,3);
activeSheet.setValue(2,0, 100,3);
activeSheet.setValue(3,0, 2,3);
activeSheet.setValue(4,0, 60,3);
activeSheet.setValue(5,0, 90,3);
activeSheet.setValue(6,0, 3,3);
activeSheet.setValue(7,0, 40,3);
activeSheet.setValue(8,0, 70,3);
activeSheet.setValue(9,0, 5,3);
activeSheet.setValue(10,0, 35,3);
var style = new GcSpread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GcSpread.Sheets.LineBorder("blue");
style.borderTop = new GcSpread.Sheets.LineBorder("blue");
style.borderRight = new GcSpread.Sheets.LineBorder("blue");
style.borderBottom = new GcSpread.Sheets.LineBorder("blue");

var cfs = activeSheet.getConditionalFormats();
var average = new GcSpread.Sheets.AverageRule();
average.style = style;
average.type = GcSpread.Sheets.AverageConditionType.Above;
average.ranges = [new GcSpread.Sheets.Range(0, 0, 10, 3)];
cfs.addRule(average);
Inheritance Hierarchy

Object
   GcSpread.Sheets.AverageConditionType

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.