LabelForm.setAlignmentX(value)
Specifies the horizontal alignment of the label with respect to the specified X location. Alignment is also applied to the label text.
Values
Chart.LEFT_ALIGNMENT
Chart.CENTER_ALIGNMENT
Chart.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 form1 = new LabelForm();
var form2 = new LabelForm();
form1.setLabel("label1");
form1.setPoint(new java.awt.Point(120, 100));
form2.setLabel("label2");
form2.setPoint(new java.awt.Point(120, 120));
form2.setAlignmentX(Chart.CENTER_ALIGNMENT);
graph.addForm(form1);
graph.addForm(form2);
graph.addElement(elem);

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