ShapeForm.setAlignmentX(value)
Specifies the horizontal alignment of the shape with respect to the specified X position.
Values
GraphConstants.LEFT_ALIGNMENT
GraphConstants.CENTER_ALIGNMENT
GraphConstants.RIGHT_ALIGNMENT
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();
shape1.setPoint(new java.awt.geom.Point2D.Double(.5,.75));
shape1.setShape(GShape.FILLED_TRIANGLE);
shape1.setColor(java.awt.Color(0xff0000));
shape1.setSize(new java.awt.Dimension(20,20));
shape1.setAlignmentX(GraphConstants.LEFT_ALIGNMENT);
shape2.setPoint(new java.awt.geom.Point2D.Double(.5,.5));
shape2.setShape(GShape.FILLED_TRIANGLE);
shape2.setColor(java.awt.Color(0x000000));
shape2.setSize(new java.awt.Dimension(20,20));
shape2.setAlignmentX(GraphConstants.CENTER_ALIGNMENT);
graph.addForm(shape1);
graph.addForm(shape2);
graph.addElement(elem);

See Also
DataSet, to use a Data Block or query as the dataset source.
| << CR.8.6 ShapeForm | © 1996-2013 InetSoft Technology Corporation (v11.4) | ShapeForm.setAlignmentY(value) >> |