SpreadJS Documentation
DataBarAxisPosition Enumeration
Specifies the position of the data bar's axis.
Members
MemberDescription
AutomaticSpecifies whether to display at a variable position based on negative values.
CellMidPointSpecifies whether to display at the cell midpoint.
NoneSpecifies whether to display value bars in the same direction as positive values.
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);
Inheritance Hierarchy

Object
   GcSpread.Sheets.DataBarAxisPosition

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.