InetSoft Product Information: Chart Code

AxisSpec.setAbbreviate(boolean)

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.

Parameter
 Boolean
 true: drop common prefixes
 false: do not drop prefixes
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 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.

AxisSpec.setAxisStyle(value)

Specifies the axis style.

Parameter
 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)
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);

AxisSpec.setGridAsShape(boolean)

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.

Parameter
 Boolean
 true if represented as shape
 false if represented as position

AxisSpec.setGridColor(value)

Specifies the color of the axis grid lines.

Parameter
 value
 a java.awt.Color 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 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);

AxisSpec.setGridOnTop(boolean)

Specifies whether axis grid lines are layered over or under the chart elements.

Parameter
 Boolean
 true: grid overlays elements
 false: elements overlay grid
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.setGridOnTop(true);
 aspec.setGridColor(java.awt.Color(0xff0000));
 aspec.setGridStyle(Chart.DASH_LINE);
 qscale.setAxisSpec(aspec);
 graph.setScale("Quantity", qscale);
 graph.addElement(elem);

More Articles About Charts

Ad Hoc Analysis in Biotech - Ad hoc analysis allows researchers, scientists, and professionals in the biotech industry to explore data, identify patterns, and gain insights in real-time without the need for pre-defined queries or reports. In the biotech field, ad hoc analysis is widely used for various purposes: Drug Development and Clinical Trials: Biotech companies use ad hoc analysis to analyze clinical trial data, evaluate the efficacy and safety of drugs, and identify potential adverse effects. Researchers can explore patient data, treatment outcomes, and biomarker responses to make data-driven decisions during the drug development process...

Explaining Database Schemas - A database schema is the table structure of a database, independent of the data it contains. Database theory offers a mathematical description of database schemas, but from a practical perspective a schema specifies the table names, number of columns in each table, column names, and data types. The schema fully specifies the scope of data that can be read or written to the database, but does not include any data. The schema also specifies that certain columns are special 'key' columns for purposes of relating data...

InetSoft Over Microsoft PerformancePoint - Enterprise Data Mashup– InetSoft's Style Intelligence is built upon an enterprise data mash-up platform, while PerformancePoint is based on Microsoft's SQL Analysis Service. Enterprise data mashup refers to the ability to pull source data from any location and in almost any format and mash it up on the fly for dynamic information requests. The result is a structured virtual data model that consists of reusable data blocks that can be queried in real-time for presentation in Style Intelligence dashboards and reports, or used by 3rd-party applications. PerformancePoint has no data mashup feature...

MySQL's Advantages and Disadvantages - Are you looking for a good self hosted business intelligence? Unlike many other modern BI providers, InetSoft's server-based solution is designed to be hosted wherever you want it. You are free to choose whichever cloud computing service or install the application in your own network. The pioneering dashboard reporting tool makes producing great-looking web-based reports and dashboards easy with a drag-and-drop designer and the ability to connect to all your data sources, on premise or in the cloud. Maximize self-service for all types of users. No dedicated BI developer required. View a demo and try interactive examples...

MySQL's Advantages and Disadvantages - Can MySQL be used for data analytics and reporting? Thousands of installations, configuration, and optimization manuals and courses for MySQL are available online. None of these articles, however, ever pause to consider if MySQL is the best option for business intelligence. The apparent qualification being that the scope, schedule, and budget of each project vary. By listing some of its features, this article will try to address the topic of how Oracle's MySQL fits into the world of analytics. This essay will not tell you if MySQL is excellent or bad, but rather whether it could be a suitable choice for a BI project...

What Is the Inequality Join? - The Inequality Join replaces the equality constraint of the inner join with an inequality constraint (greater than, less than, not equal to, etc.). The procedure remains the same: First form the cross join, and then retain rows that match the inequality join condition. For example, here is the "not equal" join of the original SALES_EMPLOYEES and REGIONS tables...

Previous: Dashboard Code
Next: Axis Grid