TextFrame.setText(value,text)

TextFrame.setText(value,text)

Specifies the mapping between a value and the text that should be displayed.

Parameters

value the data value to be replaced

text the replacement string

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 cframe = new CategoricalColorFrame();

var tframe = new DefaultTextFrame();

var spec = cframe.getLegendSpec();

cframe.setField("State");

tframe.setText('NJ','New Jersey');

tframe.setText('NY','New York');

spec.setTextFrame(tframe)

elem.setColorFrame(cframe);

graph.addElement(elem);

 

See Also

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

<< CR.7.40 TextFrame © 1996-2013 InetSoft Technology Corporation (v11.4) CR.7.41 DefaultTextFrame >>