CR.7.11 RGBCubeColorFrame
The RGBCubeColorFrame object contains a continuous color frame that returns colors drawn from a range of the RGB color cube specified by two boundary colors, [rgb1,rgb2]. To create a RGBCubeColorFrame object, call the RGBCubeColorFrame constructor.
var frame = new RGBCubeColorFrame('Quantity',[rgb1,rgb2]);
You can pass the name of a field (e.g., 'Quantity') to the constructor, or specify this later using the inherited VisualFrame.setField(field) property.
Note: Report script that modifies 'bindingInfo' should be placed in the onLoad handler.
Example (Report)
Bind a bar-type chart to the sample 'All Sales' query, with 'Company' (top 5) on the X-axis, and Sum(Total) on the Y-axis. Add the following script in the onLoad handler.
Chart1.bindingInfo.setColorField("Total",Chart.NUMBER);
Chart1.bindingInfo.colorFrame = new RGBCubeColorFrame([[0,0,0],[.5,1,1]]);

Note: Script that modifies 'graph' should be placed at the element level. See Adding Element-Level Script in Report Scripting and Adding Component Script in Dashboard Scripting for more information.
Example (Report or Viewsheet)
dataset = [["State","Quantity"],["NJ",200],["NY",300],["PA",50],["CT",100]];
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var frame = new RGBCubeColorFrame([[0,0,0],[.5,1,1]]);
frame.setField("Quantity");
elem.setColorFrame(frame);
graph.addElement(elem);

Full Name
inetsoft.graph.aesthetic.RGBCubeColorFrame
See Also
DataSet, to use a Data Block or query as the dataset source.
| << CR.7.10 RainbowColorFrame | © 1996-2013 InetSoft Technology Corporation (v11.5) | CR.7.12 CategoricalColorFrame >> |