CR.9.4  GShape.ImageShape

GShape.ImageShape.image

GShape.ImageShape.tile

The GShape.ImageShape object contains a custom image to be used as a fill pattern with StaticShapeFrame and CategoricalShapeFrame objects. To create an ImageShape object, call the object constructor:

var shape = new GShape.ImageShape("http://.../image.gif");

You can provide the image location as input to the constructor, e.g.,

var shape = new GShape.ImageShape("http://.../image.gif");

or specify this later using the GShape.ImageShape.image 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)

var logo = getImage("http://www.inetsoft.com/images/home/logo.gif");

var shape = new GShape.ImageShape();

shape.image = logo;

var frame = new StaticShapeFrame(shape);

Chart1.bindingInfo.shapeFrame = frame;

 

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]];

graph = new EGraph();

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

var logo = getImage("http://www.inetsoft.com/images/home/logo.gif");

var shape = new GShape.ImageShape();

shape.image = logo;

var frame = new StaticShapeFrame(shape)

elem.setShapeFrame(frame);

graph.addElement(elem);

 

Example (Report or Viewsheet)

dataset = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];

graph = new EGraph();

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

var logo = getImage("http://www.inetsoft.com/images/home/logo.gif");

var shape = new GShape.ImageShape(logo);

var frame = new CategoricalShapeFrame("State");

frame.setShape("NJ", shape);

elem.setShapeFrame(frame);

graph.addElement(elem);

 

Full Name

inetsoft.graph.aesthetic.GShape.ImageShape

GShape.ImageShape: setShape, setTile

See Also

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

StaticShapeFrame, for information on using custom images.

<< CR.9.3 GShape © 1996-2013 InetSoft Technology Corporation (v11.5) GShape.ImageShape.image >>