Spread.Sheets Documentation
useNegativeFillColor Method
GC.Spread.Sheets.ConditionalFormatting Namespace > DataBarRule class : useNegativeFillColor Method
Whether the negative fill color is used to paint the negative value.
Gets or sets a value that indicates whether the negative fill color is used to paint the negative value.
Syntax
var instance = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule(minType, minValue, maxType, maxValue, color, ranges);
var returnValue; // Type: any
returnValue = instance.useNegativeFillColor(value);
function useNegativeFillColor( 
   value : boolean
) : any;

Parameters

value
Whether the negative fill color is used to paint the negative value.

Return Value

If no value is set, returns the value that indicates whether the negative fill color is used to paint the negative value; otherwise, returns the data bar rule.
Example
This example uses the useNegativeFillColor method.
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();
dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
dataBarRule.minValue(-1);
dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
dataBarRule.maxValue(40);
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);
Remarks
The default value is true.
See Also

Reference

DataBarRule class