ShapeForm.setPoint(value)

Specifies the pixel location or proportional location where the shape is placed. (Positive values specify distance from left/bottom. Negative values specify distance from right/top.)

Type

value a subclass of java.awt.geom.Point2D

e.g.,

java.awt.Point for pixels

java.awt.geom.Point2D.Double for proportion

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 shape1 = new ShapeForm();

var shape2 = new ShapeForm();

 

// Set shape1 points in pixels:

shape1.setPoint(new java.awt.Point(150, 100));

shape1.setShape(GShape.FILLED_TRIANGLE);

shape1.setColor(java.awt.Color(0xff0000));

shape1.setSize(new java.awt.Dimension(10,10));

 

// Set shape2 points proportionally:

shape2.setPoint(new java.awt.geom.Point2D.Double(.5,.5));

shape2.setShape(GShape.FILLED_TRIANGLE);

shape2.setColor(java.awt.Color(0xff0000));

shape2.setSize(new java.awt.Dimension(20,20));

 

graph.addForm(shape1);

graph.addForm(shape2);

graph.addElement(elem);

 

See Also

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

<< ShapeForm.setAlignmentY(value) © 1996-2013 InetSoft Technology Corporation (v11.4) ShapeForm.setRotation(value) >>