Specifies that the common prefix of TimeScale labels should be omitted to conserve space. This property is only observed when a Date format is specified.
Boolean true: drop common prefixes false: do not drop prefixes
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 date1 = new Date(); var date2 = new Date(); date1.setFullYear(2008,0,1); date2.setFullYear(2008,10,1); var arr = [["Date", "Quantity"], [date1,200], [date2,300]]; dataset = new DefaultDataSet(arr); graph = new EGraph(); var elem = new IntervalElement("Date", "Quantity"); var tscale = new TimeScale("Date"); var aspec = new AxisSpec(); var tspec = new TextSpec(); tspec.setFormat(java.text.SimpleDateFormat('yyyy-MMM')); aspec.setTextSpec(tspec); aspec.setAbbreviate(true); tscale.setAxisSpec(aspec); graph.setScale("Date", tscale); graph.addElement(elem);
Specifies the axis style.
value AxisSpec.AXIS_SINGLE (axes on left/bottom) AxisSpec.AXIS_SINGLE2 (axis on top/right) AxisSpec.AXIS_DOUBLE (both axes, left/bot labels) AxisSpec.AXIS_DOUBLE2 (both axes, top/right labels) AxisSpec.AXIS_CROSS (axis at zero-position) AxisSpec.AXIS_NONE (axis not drawn)
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",20000],["NY",30000]]; dataset = new DefaultDataSet(arr); graph = new EGraph(); var elem = new IntervalElement("State", "Quantity"); var qscale = new LinearScale("Quantity"); var aspec = new AxisSpec(); aspec.setAxisStyle(AxisSpec.AXIS_DOUBLE2); qscale.setAxisSpec(aspec); graph.setScale("Quantity", qscale); graph.addElement(elem);
Specifies whether axis grid lines are represented as shapes or positions. If represents as shapes, the grid lines can be transformed into curves under a coordinate transformation (for example, transformation of rectangular to polar coordinates). Otherwise, the grid lines remain straight, and only the endpoints are transformed.
Boolean true if represented as shape false if represented as position
Specifies the color of the axis grid lines.
value a java.awt.Color 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 form = new LabelForm(); form.setLabel("label1"); form.setValues(['NY', 100]); var spec = new TextSpec(); spec.setBackground(java.awt.Color(0xcccccc)); form.setTextSpec(spec) graph.addForm(form); graph.addElement(elem);
Specifies whether axis grid lines are layered over or under the chart elements.
Boolean true: grid overlays elements false: elements overlay grid
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",20000],["NY",30000]]; dataset = new DefaultDataSet(arr); graph = new EGraph(); var elem = new IntervalElement("State", "Quantity"); var qscale = new LinearScale("Quantity"); var aspec = new AxisSpec(); aspec.setGridOnTop(true); aspec.setGridColor(java.awt.Color(0xff0000)); aspec.setGridStyle(Chart.DASH_LINE); qscale.setAxisSpec(aspec); graph.setScale("Quantity", qscale); graph.addElement(elem);
Copyright © 2024, InetSoft Technology Corp.