Example Code for InetSoft's Executive Dashboard API

Changing Scaling for a VisualFrame

A VisualFrame object contains information about how data values are mapped to physical properties of chart elements. For example, a BrightnessColorFrame contains information about how data values in a field map to the brightness of corresponding chart elements. Mappings of this type require a Scale.

To change the scaling of a VisualFrame object, simply assign a new Scale to the VisualFrame. For example, consider the following chart:

 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.data)
   var arr = [["State","Quantity","Total"],
            ["NJ",200,2500],
            ["NY",300,1500]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new BrightnessColorFrame();
 frame.setField("Total");
 frame.setColor(java.awt.Color(0xff0000));
 elem.setColorFrame(frame);
 graph.addElement(elem);

Note that in this chart the IntervalElement object implicitly defines a linear Y-axis scale. However, the data values on the chart are widely different in magnitude, which suggests that a log scale might be more appropriate.

Follow these steps:

  1. Define the desired Scale object explicitly. In this case, create a LinearScale based on the 'Total' field.
  2.  var scale = new LinearScale("Total");
     scale.setFields("Total");
  3. Set the minimum and maximum values of the new Scale object.
  4.  scale.setMax(3000);
     scale.setMin(500);
  5. Assign the new scale to the existing VisualFrame object.
  6.  frame.setScale(scale);

The complete script with the new VisualFrame scaling looks like this:

 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.data)
   var arr = [["State","Quantity","Total"],
            ["NJ",200,2500],["NY",300,1500]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new BrightnessColorFrame();
 frame.setField("Total");
 frame.setColor(java.awt.Color(0xff0000));
 var scale = new LinearScale("Total");
 scale.setFields("Total");
 scale.setMax(3000);
 scale.setMin(500);
 frame.setScale(scale);
 elem.setColorFrame(frame);
 graph.addElement(elem);

More Articles About Dashboarding

Ability To Integrate With Other Tools - The ability to integrate with other tools is one of the essential features of good financial analysis software. Integrations are key because they allow you to automatically pull data from other sources and import it into your spreadsheet or database. For example, you can use integration with QuickBooks to import your company's invoices and purchase orders without manually entering them. Another benefit of integrations is that they allow you to view your data in multiple formats. You can export your data in Excel or spreadsheets, which can be useful for sharing with colleagues or customers...

Average Loan Value KPI - The loan value gives you a good idea of how profitable the loans are. To get the average value, take the sum of all the loans approved within a certain period, divided by the number of loans approved in that period. Usually, the time and work it takes to process a loan application is the same, regardless of the amount of money a customer applies to borrow. Therefore, having a low average value means that employees spend a lot of time processing small amounts for low revenue when it would b more profitable to process fewer applications of a higher value...

Collection of Executive Dashboard Examples - Below are executive dashboard examples designed using InetSoft's drag and drop dashboard solution, some of which can be tested with the free downloadable evaluation copy of Style Intelligence, while others can be seen in the free visualization tool, Visualize Free. This call center executive dashboard gives shows call center managers how many calls their employees are handling and how long they are taking. The dashboard refreshes ever 30 seconds, with individual employees represented with icons that change color when the employee is on the phone...

Treatment Effectiveness KPI - Treatment efficacy is another key KPI for mental health treatments. How successfully mental health services accomplish their therapeutic objectives is measured by treatment effectiveness. To evaluate the efficiency of their treatment programs and make necessary modifications, mental health services must measure treatment effectiveness. Patient surveys, treatment outcome measures, and chart audits are just a few of the techniques that mental health professionals might employ to gauge how successful their treatments are. Measures of the effectiveness of the therapy evaluate how well patients are responding to the treatment. Standardized outcome measures, such the PHQ-9 or GAD-7, may be used by mental health professionals to monitor patient improvement...

What Is a Report Server Cluster? - A Report Server Cluster is a configuration where multiple report servers are deployed together to provide high availability and improved performance for handling report generation and distribution tasks. It is a common setup in enterprise environments where the demand for reporting services is high and there's a need for fault tolerance and load balancing...

Who Uses Executive Program Management Dashboards? - Executive Program Management Dashboards are used by a wide range of organizations across different industries. These dashboards serve as a crucial tool for senior executives, program managers, and decision-makers to gain real-time insights and monitor key performance indicators (KPIs) related to various projects and programs. Here are some of the types of organizations and professionals who commonly use Executive Program Management Dashboards. Non-profit organizations use program management dashboards to track the progress of initiatives related to social causes, humanitarian efforts, community development, and more...

Previous: Dashboard Reporting API