InetSoft Product Information: Graph JavaScript
EGraph.setLegendLayout(value)
Specifies the chart legend's position.
Parameter
value GraphConstants.BOTTOM // below chart data GraphConstants.TOP // above chart data GraphConstants.RIGHT // right of chart GraphConstants.LEFT // left of chart GraphConstants.IN_PLACE // floated on chart GraphConstants.NO_LEGEND // no legend
Example (Report or Viewsheet)
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.guide.form)
var arr = [["State", "Quantity"], ["NJ",200], ["NY",300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var frame = new CategoricalColorFrame();
frame.setField("State");
elem.setColorFrame(frame);
graph.setLegendLayout(GraphConstants.BOTTOM);
graph.addElement(elem);
| View a five-minute Flash demo to get an overview of what InetSoft's business intelligence software, Style Intelligence, can do and how easy it is to use. |
![]() |
EGraph.setCoordinate(coord)
Sets the specified Coordinate for the chart. See Chart Coordinates & Scaling for available coordinate types.
Parameter
coord a Coordinate 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"], ["NJ", 200], ["NY", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var sscale = new CategoricalScale("State");
var qscale = new LinearScale("Quantity");
var coord = new RectCoord(sscale,qscale);
coord.transpose();
graph.setCoordinate(coord);
graph.addElement(elem);
EGraph.setScale(field, scale)
Sets the specified Scale for the given axis. See Chart Coordinates & Scaling for available scales.
Parameters
field name of axis to receive scale (String) scale scale to apply to axis (Scale)
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"], ["NJ", 200], ["NY", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new LineElement("State", "Quantity");
var qscale = new LinearScale("Quantity");
qscale.setMin(100);
qscale.setMax(500);
graph.addElement(elem);
graph.setScale("Quantity", qscale);
| Previous: Chart JS | Next: Dashboard JavaScript |
More Resources:
| Data Integration Software | ||
| Data Modeler Data Connectivity Toolkit | ||
| Defining CORBA Data Sources | ||
| Displaying Values on a Map |



