Spread.Sheets Documentation
addDataBarRule Method
The minimum scale type.
The minimum scale value.
The maximum scale type.
The maximum scale value.
The color data bar to show on the view.
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
Adds a data bar rule to the rule collection.
Syntax
var instance = new GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats(worksheet);
var value; // Type: object
value = instance.addDataBarRule(minType, minValue, maxType, maxValue, color, ranges);
function addDataBarRule( 
   minType : ScaleValueType,
   minValue : object,
   maxType : ScaleValueType,
   maxValue : object,
   color : string,
   ranges : undefined
) : object;

Parameters

minType
The minimum scale type.
minValue
The minimum scale value.
maxType
The maximum scale type.
maxValue
The maximum scale value.
color
The color data bar to show on the view.
ranges
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.

Return Value

The data bar rule added to the rule collection.
Example
This example uses the addDataBarRule 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);
activeSheet.conditionalFormats.addDataBarRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, -1, GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 40, "orange", [new GC.Spread.Sheets.Range(0,0,4,1)]);
See Also

Reference

ConditionalFormats type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.