SpreadJS 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 GcSpread.Sheets.Range.
Adds a data bar rule to the rule collection.
Syntax
var instance = new GcSpread.Sheets.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 : Array
) : 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 GcSpread.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.getConditionalFormats().addDataBarRule(GcSpread.Sheets.ScaleValueType.Number, -1, GcSpread.Sheets.ScaleValueType.Number, 40, "orange", [new GcSpread.Sheets.Range(0,0,4,1)]);
See Also

Reference

ConditionalFormats type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.