StaticLineFrame
The StaticLineFrame object contains a line frame defined by explicit line data in the VisualFrame.setField(field) column, or by the fixed line in StaticLineFrame.setLine(value) / StaticLineFrame.line. To create a StaticLineFrame object, call the StaticLineFrame constructor.
importPackage(inetsoft.graph.aesthetic);
var frame = new StaticLineFrame(GLine.LARGE_DASH);
You can pass a GLine object or a field name (e.g., 'Line') to the constructor, or specify this later using the StaticLineFrame.setLine(value) / StaticLineFrame.line or inherited VisualFrame.setField(field) property.
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.
importPackage(inetsoft.graph.aesthetic);
Graph1.bindingInfo.setShapeField("Company",Chart.NUMBER)
Graph1.bindingInfo.lineFrame = new StaticLineFrame;
Graph1.bindingInfo.lineFrame.line = GLine.LARGE_DASH;
Example (Report or Viewsheet)
Bind a point-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.
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.data)
var arr = [["State","Quantity","Line"],
["NJ",200,GraphConstants.THICK_LINE],
["NY",300,GraphConstants.MEDIUM_DASH]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new PointElement("State", "Quantity");
var sizeframe = new StaticSizeFrame(9);
var lineframe = new StaticLineFrame();
lineframe.setField("Line");
elem.setLineFrame(lineframe);
elem.setSizeFrame(sizeframe);
graph.addElement(elem);