InetSoft's Chart API

InetSoft's dashboard reporting software includes a chart API for complete control over charting when the built-in chart types needs to be further customized. There are several different coordinate objects, each of which creates a different kind of chart. The following sections discuss the different types of chart coordinate systems.

 
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Rectangular Coordinates

The default coordinate set is rectangular coordinates, as defined by the RectCoord object. Rectangular coordinates represent two-dimensional data on horizontal (X) and vertical (Y) axes. A RectCoord object is created automatically when you create a new chart object. Therefore, if you plan to use rectangular coordinates on the chart, you do not need to explicitly specify a RectCoord object. You only need to explicitly create a RectCoord object when you define other types of coordinate systems. (See the following sections for more details.)

view gallery
View live interactive examples in InetSoft's dashboard and visualization gallery.

Assigning Rectangular Coordinates Automatically

The following example illustrates automatic creation of rectangular coordinates:

importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.coord)
importPackage(inetsoft.graph.data)

var arr = [["Direction", "Score"],
 [(Math.PI/2),20],
 [(Math.PI/4),30],
 [(Math.PI),35]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new PointElement("Direction", "Score");
var xscale = new LinearScale("Direction");
var yscale = new LinearScale("Score");
yscale.setMin(0);
yscale.setMax(40);
var yaxis = new AxisSpec();
yaxis.setGridStyle(GraphConstants.DOT_LINE);
yscale.setAxisSpec(yaxis);
xscale.setMin(0);
xscale.setMax(1.95*Math.PI);
xscale.setIncrement(Math.PI/8);
var xaxis = new AxisSpec();
var tspec = new TextSpec();
tspec.setFormat(new java.text.DecimalFormat("0.0"));
xaxis.setTextSpec(tspec);
xaxis.setGridStyle(GraphConstants.DOT_LINE);
xscale.setAxisSpec(xaxis);
graph.setScale("Direction",xscale);
graph.setScale("Score",yscale);
graph.addElement(elem);

The script defines a PointElement style (scatter plot), and specifies a LinearScale for the 'Direction' field and 'Score' field. Note that the script does not explicitly create a RectCoord object. A rectangular coordinate system is created automatically, and this allows you to assign the specified scales directly to the Graph:

graph.setScale("Direction",xscale); 
graph.setScale("Score",yscale);

Assigning Rectangular Coordinates Explicitly You can explicitly define the RectCoord object, if needed. The script below is the same as the script in Assigning Rectangular Coordinates Automatically, but uses two scales to explicitly define a set of rectangular coordinates. These coordinates are then explicitly assigned to the chart.

 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.data)
   var arr = [["Direction", "Score"],
            [(Math.PI/2),20],
            [(Math.PI/4),30],
            [(Math.PI),35]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new PointElement("Direction", "Score");
 var xscale = new LinearScale("Direction");
 var yscale = new LinearScale("Score");
 yscale.setMin(0); yscale.setMax(40);
 var yaxis = new AxisSpec();
 yaxis.setGridStyle(GraphConstants.DOT_LINE);
 yscale.setAxisSpec(yaxis);
   xscale.setMin(0);
 xscale.setMax(1.95*Math.PI);
 xscale.setIncrement(Math.PI/8);
 var xaxis = new AxisSpec();
 var tspec = new TextSpec();
 tspec.setFormat(new java.text.DecimalFormat("0.0"));
 xaxis.setTextSpec(tspec);
 xaxis.setGridStyle(GraphConstants.DOT_LINE);
 xscale.setAxisSpec(xaxis);
   graph.setScale("Direction",xscale);
 graph.setScale("Score",yscale);
 var rect = new RectCoord(xscale,yscale);
 graph.setCoordinate(rect);
 graph.addElement(elem);

The resulting chart is the same as in the previous case.

More Articles About Charts

BI Professionals Supporting Others - So, you have to be able to surface constraints and show them to people. Now, the report shows the data well, but it typically does not show the constraints that we're applying to retrieve that data. This often leads in the BI world to problem solving for us as the BI professionals supporting others. These aren't the constraints you're looking for. You have the report using these constraints, but you left out some data. That's why your numbers don't match...

Role of KPIs in Grant Management - Dashboards help give your grant programs direction and offer needed traceability to grantors, so they must track KPIs. These are metrics that indicate your success in a given area. Monitoring relevant KPIs provides hard data on where you're doing well and where you can improve. Just as financial metrics offer insight into business performance, grant-related KPIs reveal how well you use your grantor's funds. You can then point to specifics when they inquire where their money is going. Alternatively, you can monitor them to see if a project isn't yielding results, informing changes to make more cost-effective use of these investments...

Style Intelligence Over Tableau - InetSoft's data caching architecture delivers massive query performance boosts by caching data viewed by end users. Tableau also provides such a caching feature. InetSoft utilizes columnar database, Hadoop and Map Reduce technologies to store and query the cache in parallel across one or more servers. InetSoft also provides advanced cache management and configurations options like rolling time window, incremental updates. Tableau utilizes only columnar database technology to store and query the cache on a single Tableau server, and provides a simple increment all update functionality...

Subcontractor Performance Metrics - The success of a project is greatly influenced by the performance of subcontractors. KPIs and analytics that evaluate subcontractor performance, such as completion rates, timetable adherence, and job quality supplied, are included in subcontractor software dashboards. With the use of these indicators, project managers may identify top-performing subcontractors, assess subcontractor contributions objectively, and quickly resolve performance concerns. Client satisfaction and overall project efficiency are enhanced by efficient subcontractor management...

Monitoring Waste Segregation and Source Identification - Reducing trash and raising recycling rates need an understanding of the sources of waste formation and the use of efficient segregation techniques. This category of KPIs helps with focused waste reduction efforts by giving information on which areas or processes produce the most waste...

Previous: Dashboarding API