SpreadJS Documentation
AverageConditionType Enumeration
GC.Spread.Sheets.ConditionalFormatting Namespace : 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 GC.Spread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);

var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.averageRule);
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
rule.style(style);
rule.type(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above);
activeSheet.conditionalFormats.addRule(rule); 
Inheritance Hierarchy

Object
   GC.Spread.Sheets.ConditionalFormatting.AverageConditionType

See Also

Reference

GC.Spread.Sheets.ConditionalFormatting Namespace