Spread.Sheets Documentation
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 ConstructorDataBarRule ConstructorRepresents a data bar conditional rule with the specified parameters.  
Top
Methods
 NameDescription
public MethodaxisColorGets or sets the axis color of the data bar.  
public MethodaxisPositionGets or sets the axis position of the data bar.  
public MethodborderColorGets or sets the color of the border.  
public MethodcolorGets or sets the postive fill color of the data bar.  
public MethodcreateCondition (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethoddataBarDirectionGets or sets the data bar direction.  
public MethodevaluateReturns the specified value of the rule if the cell meets the condition.  
public MethodgradientGets or sets a value that indicates whether the data bar is a gradient.  
public MethodmaxColor (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodmaxType (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodmaxValue (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodmidColor (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodmidType (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodmidValue (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodminColor (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodminType (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodminValue (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethodnegativeBorderColorGets or sets the color of the negative border.  
public MethodnegativeFillColorGets or sets the color of the negative fill.  
public MethodshowBarOnlyGets or sets whether to display the data bar without text.  
public MethodshowBorderGets or sets a value that indicates whether to paint the border.  
public MethodstopIfTrue (Inherited from GC.Spread.Sheets.ConditionalFormatting.ScaleRule)
public MethoduseNegativeBorderColorGets or sets a value that indicates whether the negative border color is used to paint the border for the negative value.  
public MethoduseNegativeFillColorGets 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

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.