Spread.Sheets Documentation
DataBarRule class
GC.Spread.Sheets.ConditionalFormatting Namespace : DataBarRule class
Represents a data bar conditional rule with the specified parameters.
Syntax
var instance = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule(minType, minValue, maxType, maxValue, color, ranges);
function DataBarRule;
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 dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, -1, GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 40, "green", [new GC.Spread.Sheets.Range(0,0,4,1)]);
dataBarRule.color("green");
dataBarRule.showBorder(true);
dataBarRule.borderColor("orange");
dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
dataBarRule.negativeFillColor("yellow");
dataBarRule.useNegativeFillColor(true);
dataBarRule.negativeBorderColor("red");
dataBarRule.useNegativeBorderColor(true);
dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
dataBarRule.axisColor("blue");
dataBarRule.showBarOnly(false);
activeSheet.conditionalFormats.addRule(dataBarRule);
Inheritance Hierarchy

Object
   GC.Spread.Sheets.ConditionalFormatting.ScaleRule
      GC.Spread.Sheets.ConditionalFormatting.DataBarRule

Constructors
 NameDescription
public ConstructorRepresents a data bar conditional rule with the specified parameters.  
Top
Methods
 NameDescription
public MethodGets or sets the axis color of the data bar.  
public MethodGets or sets the axis position of the data bar.  
public MethodGets or sets the color of the border.  
public MethodGets or sets the postive fill color of the data bar.  
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodGets or sets the data bar direction.  
public MethodReturns the specified value of the rule if the cell meets the condition.  
public MethodGets or sets a value that indicates whether the data bar is a gradient.  
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodGets or sets the color of the negative border.  
public MethodGets or sets the color of the negative fill.  
public MethodGets or sets whether to display the data bar without text.  
public MethodGets or sets a value that indicates whether to paint the border.  
public Method (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodGets or sets a value that indicates whether the negative border color is used to paint the border for the negative value.  
public MethodGets or sets a value that indicates whether the negative fill color is used to paint the negative value.  
Top
See Also

Reference

GC.Spread.Sheets.ConditionalFormatting Namespace
Using the Data Bar Rule