RightTiltTextureFrame
The RightTiltTextureFrame object contains a texture for visual chart objects rendered by positively-sloping lines with variable spacing. To create a RightTiltTextureFrame object, call the RightTiltTextureFrame constructor.
var frame = new RightTiltTextureFrame('Total');
You can pass the name of a field (e.g., ‘Total’) to the constructor, or specify this later using the inherited VisualFrame.setField(field) property. You can also assign a TextureFrame using the bindingInfo.textureFrame property in onRefresh script. See Example 2 below.
Example 1
dataset = [["State", "Quantity","Total"], ["NJ",300,10],["NY",200,20],["PA",250,35]]; (1)
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var frame = new RightTiltTextureFrame("Total"); (2)
elem.setTextureFrame(frame); (3)
graph.addElement(elem);
| 1 | See dataset to use a data block instead of an array literal. |
| 2 | Create the RightTiltTextureFrame object. |
| 3 | Use GraphElement.setTextureFrame(frame) to add the TextureFrame to the IntervalElement. |

Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.
|
Example 2
This example illustrates how to use bindingInfo properties to control the TextureFrame.
-
Bind a Bar Chart to the sample ‘All Sales’ Data Worksheet, with ‘Company’ (top 5) on the X-axis, and Sum(Total) on the Y-axis.
The ‘All Sales’ Data Worksheet can be found in the folder. You may need to download the examples.zip file from GitHub into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import. -
Add the following script in the onRefresh handler. (See Add Dashboard Script.)
onRefresh ScriptChart1.bindingInfo.setShapeField("Total",Chart.NUMBER); Chart1.bindingInfo.textureFrame = new RightTiltTextureFrame;
Dashboard script that modifies bindingInfoshould generally be placed in the onRefresh handler. See Add Dashboard Script.