GcSpread.Sheets Namespace : DataBarRule class |
var instance = new GcSpread.Sheets.DataBarRule(minType, minValue, maxType, maxValue, color);
function DataBarRule;
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);
Object
GcSpread.Sheets.ScaleRule
GcSpread.Sheets.DataBarRule
Name | Description | |
---|---|---|
DataBarRule Constructor | Represents a data bar conditional rule with the specified parameters. |
Name | Description | |
---|---|---|
ranges | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
style | (Inherited from GcSpread.Sheets.ConditionRuleBase) |
Name | Description | |
---|---|---|
axisColor | Gets or sets the axis color of the data bar. | |
axisPosition | Gets or sets the axis position of the data bar. | |
borderColor | Gets or sets the color of the border. | |
color | Gets or sets the postive fill color of the data bar. | |
contains | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
dataBarDirection | Gets or sets the data bar direction. | |
evaluate | Returns the specified value of the rule if the cell meets the condition. | |
getExpected | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
gradient | Gets or sets a value that indicates whether the data bar is a gradient. | |
intersects | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
maximumType | Gets or sets the maximum scale type. | |
maximumValue | Gets or sets the maximum scale value. | |
minimumType | Gets or sets the minimum scale type. | |
minimumValue | Gets or sets the minimum scale value. | |
negativeBorderColor | Gets or sets the color of the negative border. | |
negativeFillColor | Gets or sets the color of the negative fill. | |
priority | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
reset | (Inherited from GcSpread.Sheets.ConditionRuleBase) | |
showBarOnly | Gets or sets whether to display the data bar without text. | |
showBorder | Gets or sets a value that indicates whether to paint the border. | |
stopIfTrue | (Inherited from GcSpread.Sheets.ScaleRule) | |
useNegativeBorderColor | Gets or sets a value that indicates whether the negative border color is used to paint the border for the negative value. | |
useNegativeFillColor | Gets or sets a value that indicates whether the negative fill color is used to paint the negative value. |