InetSoft Product Information: Graph API

This section of API documentation discusses how to control chart dimensions when embedding a dashboard into another cloud application.

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

Parallel coordinates display multiple dimensions as parallel axes, rather than orthogonal axes, as for rectangular coordinates. Parallel coordinates are defined by the ParallelCoord object, which accepts a set of Scale objects as input.

To understand parallel coordinates, consider the following data set, which contains scores for three students over three consecutive tests.

Test 1 Test 2 Test 3 Name
200 175 50 Joe
800 1000 300 Jane
10 15 20 Fred

By plotting this data on three parallel coordinates ('Test 1', 'Test 2', 'Test 3'), you can visualize trends across the different tests. To create this chart, follow the steps below:

  1. Define the data set and chart objects.
 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 = [["Test1","Test2","Test3","Name"],
 [100,80,20,'Joe'],[75,50,40,'Jane'],
 [50,30,80,'Fred']];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
  1. Create a new LineElement object to define a line-style chart, and assign its dimensions.
 var elem = new LineElement();
 elem.addDim("Test1");
 elem.addDim("Test2");
 elem.addDim("Test3");
  1. Define the scales used for the three axes. (In this case the scales are the same for all three.)
 var scale1 = new LinearScale("Test1");
 var scale2 = new LinearScale("Test2");
 var scale3 = new LinearScale("Test3");
 scale1.setMax(100);
 scale2.setMax(100);
 scale3.setMax(100);
 scale1.setMin(0);
 scale2.setMin(0);
 scale3.setMin(0);
  1. Create the new ParallelCoord object using the defined scales.
 var coord = new ParallelCoord(scale1,scale2,scale3);
  1. Use a CategoricalColorFrame to distinguish the three students. Assign the frame to the line element.
 var frame = new CategoricalColorFrame("Name");
 elem.setColorFrame(frame);
  1. Assign the parallel coordinate system to the chart.
 graph.addElement(elem);
 graph.setCoordinate(coord);

The complete script is shown below:

 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 = [["Test1","Test2","Test3","Name"],
 [100,80,20,'Joe'],[75,50,40,'Jane'],
 [50,30,80,'Fred']];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new LineElement();
 elem.addDim("Test1");
 elem.addDim("Test2");
 elem.addDim("Test3");
 var scale1 = new LinearScale("Test1");
 var scale2 = new LinearScale("Test2");
 var scale3 = new LinearScale("Test3");
 scale1.setMax(100);
 scale2.setMax(100);
 scale3.setMax(100);
 scale1.setMin(0);
 scale2.setMin(0);
 scale3.setMin(0);
 var coord = new ParallelCoord(scale1,scale2,scale3);
 var frame = new CategoricalColorFrame("Name");
 elem.setColorFrame(frame);
 graph.addElement(elem);
 graph.setCoordinate(coord); 
Learn about the top 10 features of embedded business intelligence.

More Articles About Graphing

Agile Development Principles in Business Intelligence - Applying Agile development principles to Business Intelligence (BI) can enhance the effectiveness, flexibility, and responsiveness of BI projects. Here's how Agile principles are commonly applied in the context of Business Intelligence: Iterative and Incremental Development: Sprints for BI Development: BI projects are broken down into short development cycles or sprints, typically 2-4 weeks. Each sprint delivers a potentially shippable increment of the BI solution, allowing for continuous improvement and adaptability...

Claims Denial Rate - A crucial metric for evaluating how well a healthcare company submits and processes claims is its denial rate. This measure indicates the proportion of claims that payers reject, suggesting possible problems with coding, paperwork, or other areas of the invoicing process. Monitoring the Denial Rate helps firms identify areas for improvement, take remedial action, and minimize refused claims, boosting income...

Explaining Data Mesh Architecture - Enter data mesh architecture, a cutting-edge method of data architecture created to deal with the problems of data silos and data governance. The definition, guiding principles, advantages, and implementation of data mesh architecture will all be covered in this article. A new method of data architecture called data mesh architecture places an emphasis on decentralizing data ownership and management. Data ownership and administration are centralized in conventional methods to data architecture, which means that a single team is in charge of gathering, storing, and managing data...

Make Better Visualizations - It's the data-ink/total ink. Maximize that ratio within reason and do so by erasing any non-data ink that's redundant data, that's metadata. And once you get there look at it, see where it is, and then go back and revise again. Just like refactoring your code, refactor your graphs. Moving on to the next point: chart junk. Chart junk is anything that doesn't really contribute to the graph at all. That's tough to discern. It's crap that's on the graph that people put in there kind of just as decoration sometimes to give it some sort of dynamic motion to it...

Rules forr Creating Data Visualizations - What are some other basic rules or tenets that you've seen espoused or used effectively with respect to data visualization? Anything that comes to just the top of your head? Well, in my last book, I had a whole chapter on it and emphasized a few key principles. One, make every pixel count. Don't add decoration for decoration sake. Two, understand that you know the data has a story and your job is to bring that -- to tell that story and highlight that story...

Users Across an Enterprise Explore Data - InetSoft provides an easy-to-use, web-based BI platform that enables BI to become pervasive across your organization. Providing BI to more employees diminishes the latency between the recognition of events and the implementation of subsequent actions. Access to BI facilitates the decision-making process and speeds the deployment of organizational initiatives...

Previous: Flash Chart API (cont.)