CR.7.23  CategoricalTextureFrame

CategoricalTextureFrame.setTexture(val,texture)

The CategoricalTextureFrame object contains a texture for visual chart objects, rendering a unique texture for each discrete value. To create a CategoricalTextureFrame object, call the CategoricalTextureFrame constructor.

var frame = new GridTextureFrame('State');

You can pass the name of a field (e.g., 'State') 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 point-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.setShapeField("Employee",Chart.STRING);

Chart1.bindingInfo.textureFrame = new CategoricalTextureFrame;

Chart1.bindingInfo.textureFrame.setTexture('Robert',GTexture.PATTERN_1);

Chart1.bindingInfo.textureFrame.setTexture('Eric',GTexture.PATTERN_1);

Chart1.bindingInfo.textureFrame.setTexture('Sue',GTexture.PATTERN_5);

Chart1.bindingInfo.textureFrame.setTexture('Annie',GTexture.PATTERN_5);

 

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","Rep"], ["NJ",200,"John"], ["NY",300,"Sue"], ["PA",75,"Sue"], ["CT", 120,"John"]];

graph = new EGraph();

var elem = new IntervalElement("State", "Quantity")

var frame = new CategoricalTextureFrame();

frame.setField("Rep");

elem.setTextureFrame(frame);

graph.addElement(elem);

 

Full Name

inetsoft.graph.aesthetic.CategoricalTextureFrame

See Also

DataSet, to use a Data Block or query as the dataset source.

CategoricalTextureFrame: setTexture

<< CR.7.22 GridTextureFrame © 1996-2013 InetSoft Technology Corporation (v11.4) CategoricalTextureFrame.setTexture(val,texture) >>