InetSoft Product Information: Graph Element

GraphElement.setLabelPlacement(value)

Specifies the location of element labels.

Parameter
 value
 GraphConstants.BOTTOM  (below chart)
 GraphConstants.TOP     (above chart
 GraphConstants.RIGHT   (right of chart)
 GraphConstants.LEFT    (left of chart)
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["CA", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new PointElement("State", "Quantity");
 var frame = new DefaultTextFrame();
 frame.setField("Quantity")
 elem.setTextFrame(frame);
 elem.setLabelPlacement(GraphConstants.BOTTOM);
 graph.addElement(elem);

GraphElement.setLineFrame(frame)

Specifies the aesthetic line style of graphical elements. A LineFrame can line-code chart elements by value, or simply specify a static line style.

Parameter
 frame
 a LineFrame object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["CA", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new StaticLineFrame();
 frame.setLine(GLine.LARGE_DASH)
 elem.setLineFrame(frame);
 graph.addElement(elem);

GraphElement.setHint(type,value)

Add an effect to a GraphElement object. The available effects are HINT_EXPLODED (element separation, or explosion), HINT_SHINE (three-dimensional shading), and HINT_ALPHA (transparency).

Parameter
 type
 GraphElement.HINT_EXPLODED,
 GraphElement.HINT_SHINE, or
 GraphElement.HINT_ALPHA
 
 value
 For HINT_EXPLODED: 'true' or 'false'
 For INT_SHINE: 'true' or 'false'
 For HINT_ALPHA: float in range [0,1]
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"],["NY",200], ["NJ",300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State","Quantity");
 elem.setHint(GraphElement.HINT_SHINE,'true')
 graph.addElement(elem);

GraphElement.setShapeFrame(frame)

Specifies the aesthetic shape treatment for the chart elements. A ShapeFrame can shape-code chart elements by value, or simply specify a static shape style.

Parameter
 frame
 a ShapeFrame object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity", "m1", "m2", "m3"],
            ["NJ", 200, 6,3,4],
            ["NY", 300,8,2,5]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var frame = new StarShapeFrame();
 var elem = new PointElement("State", "Quantity");
 frame.setFields(["m1", "m2", "m3"]);
 elem.setShapeFrame(frame);
 graph.addElement(elem);
Previous: Graph Data