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.
ParameterBoolean true: drop common prefixes false: do not drop prefixesExample (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 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);
![]() |
Read how InetSoft was rated #3 for implementation in G2 Crowd's user survey-based index. |
Specifies the axis style.
Parametervalue 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)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",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.
ParameterBoolean true if represented as shape false if represented as position
Specifies the color of the axis grid lines.
Parametervalue a java.awt.Color objectExample (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 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.
ParameterBoolean true: grid overlays elements false: elements overlay gridExample (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",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);
Previous: Dashboard Code |
Next: Axis
Grid
|