Specifies the chart legend's position.
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
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);
Sets the specified Coordinate for the chart. See Chart Coordinates & Scaling for available coordinate types.
coord a Coordinate object
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);
Sets the specified Scale for the given axis. See Chart Coordinates & Scaling for available scales.
field name of axis to receive scale (String) scale scale to apply to axis (Scale)
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);
Copyright © 2023, InetSoft Technology Corp.