SpreadJS Documentation
ScaleValueType Enumeration
Specifies the scale value type.
Members
MemberDescription
AutomaxIndicates whether to return the automatic maximum value in a specified range.
AutominIndicates whether to return the automatic minimum value in a specified range.
FormulaIndicates whether to return the result of a formula calculation.
HighestValueIndicates whether to return the highest value in a specified cell range.
LowestValueIndicates whether to return the lowest value in a specified cell range.
NumberIndicates whether to return a specified number directly.
PercentIndicates whether to return the percentage of a cell value in a specified cell range.
PercentileIndicates whether to return the percentile of a cell value in a specified cell range.
Example
This example creates a data bar rule.
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,15,3);
activeSheet.setValue(2,0,25,3);
activeSheet.setValue(3,0,-1,3);

var cfs = activeSheet.getConditionalFormats();
var dataBarRule = new GcSpread.Sheets.DataBarRule();
dataBarRule.ranges=[new GcSpread.Sheets.Range(0,0,4,1)];
dataBarRule.minimumType(GcSpread.Sheets.ScaleValueType.Number);
dataBarRule.minimumValue(-1);
dataBarRule.maximumType(GcSpread.Sheets.ScaleValueType.Number);
dataBarRule.maximumValue(40);
dataBarRule.color("green");
dataBarRule.showBorder(true);
dataBarRule.borderColor("orange");
dataBarRule.dataBarDirection(GcSpread.Sheets.BarDirection.LeftToRight);
dataBarRule.negativeFillColor("yellow");
dataBarRule.useNegativeFillColor(true);
dataBarRule.negativeBorderColor("red");
dataBarRule.useNegativeBorderColor(true);
dataBarRule.axisPosition(GcSpread.Sheets.DataBarAxisPosition.Automatic);
dataBarRule.axisColor("blue");
dataBarRule.showBarOnly(false);
cfs.addRule(dataBarRule);
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)];
sheet.getConditionalFormats().addRule(rule);
sheet.setValue(0,0,1,3);
sheet.setValue(1,0,45,3);
Inheritance Hierarchy

Object
   GcSpread.Sheets.ScaleValueType

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.