CR.7.45  CategoricalLineFrame

CategoricalLineFrame.setLine(val,line)

The CategoricalLineFrame object contains a unique line style for each discrete value. To create a CategoricalLineFrame object, call the CategoricalLineFrame constructor.

var frame = new CategoricalLineFrame('Quantity');

You can pass the name of a field (e.g., 'Quantity') to the constructor, or specify this later using the inherited VisualFrame.setField(field) property.

Note: Report script that modifies 'bindingInfo' should be placed in the onLoad handler.

Example (Report)

Bind a line-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);

Chart1.bindingInfo.lineFrame = new CategoricalLineFrame;

Chart1.bindingInfo.lineFrame.setLine('Robert', GLine.LARGE_DASH);

Chart1.bindingInfo.lineFrame.setLine('Eric', GLine.LARGE_DASH);

Chart1.bindingInfo.lineFrame.setLine('Sue',GLine.DOT_LINE);

Chart1.bindingInfo.lineFrame.setLine('Annie', GLine.DOT_LINE);

 

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",300],["NY",200],["PA",100]];

graph = new EGraph();

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

var frame = new CategoricalLineFrame();

frame.setField("State");

elem.setLineFrame(frame);

graph.addElement(elem);

Full Name

inetsoft.graph.aesthetic.CategoricalLineFrame

 

See Also

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

CategoricalLineFrame: setLine

<< CR.7.44 LinearLineFrame © 1996-2013 InetSoft Technology Corporation (v11.4) CategoricalLineFrame.setLine(val,line) >>