StaticTextureFrame
The StaticTextureFrame object contains a texture frame defined by explicit texture data in the VisualFrame.setField(field) column, or by the fixed texture in StaticTextureFrame.setTexture(value) / StaticTextureFrame.Texture. To create a StaticTextureFrame object, call the StaticTextureFrame constructor.
importPackage(inetsoft.graph.aesthetic);
var frame = new StaticTextureFrame();
You can pass a GTexture object directly to the constructor, e.g.,
var frame = new StaticTextureFrame(GTexture.PATTERN_5);
or specify it later using the StaticTextureFrame.setTexture(value) / StaticTextureFrame.Texture property.
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.
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.data)
var frame = new StaticTextureFrame();
frame.setTexture(GTexture.PATTERN_5);
var elem = graph.getElement(0); // bar elements
elem.setTextureFrame(frame);
Example (Report or Viewsheet)
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.data)
var arr = [["State","Quantity","Texture"],
["NJ",200,1], ["NY",300,10]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var frame = new StaticTextureFrame();
frame.setField("Texture");
elem.setTextureFrame(frame);
graph.addElement(elem);