API Information: Chart JS

EGraph.getForm(index)

Returns a handle to the GraphForm object specified by the index. This is useful in cases where the form was not explicitly assigned to a variable at creation time.

Parameter
 index Integer index of form
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 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");
 graph.addForm(new LineForm());
 var form = graph.getForm(0);
 form.addPoint(java.awt.Point(100,100));
 form.addPoint(java.awt.Point(200,200));
 form.setColor(java.awt.Color(0xff0000));
 graph.addElement(elem);

EGraph.getFormCount()

Returns the number of forms currently present on the chart.

Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 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");
 graph.addForm(new LineForm());
 graph.addForm(new LineForm());
 graph.addForm(new LineForm());
 var formCount = graph.getFormCount();
 for (var i=0;i

EGraph.getScale(field)

Returns a handle to the Scale object specified by the field name parameter. This is useful in cases where the scale was not explicitly assigned to a variable at creation time.

Parameters
 field
 String representing field name
Example (Report)
Bind a bar-type chart to the sample 'All Sales' query, with 'Company' (top 5) on the X-axis, and Sum(Total) on the Y-axis. Add the following script:
 var scale = graph.getScale("Sum(Total)");
 scale.setMin(600000);
 scale.setMax(1000000);
Example (Viewsheet)
Create a Viewsheet based on the 'Sales Explore' Worksheet. Bind a bar-type chart with 'Company' (top 5) on the X-axis, and Sum(Total) on the Y-axis. Add the following script:
 var scale = graph.getScale("Sum(Total)");
 scale.setMin(600000);
 scale.setMax(1000000);

More Articles About Charts

Excavation Volume vs. Target - This statistic contrasts the volume of excavation that actually occurred with the aim that was set. A departure from the anticipated volume may indicate impending delays or inefficiencies, necessitating immediate remedial action. Completion Percentage The completion %, which is shown visually on the dashboard, gives a brief summary of how much of the earthwork has been completed in relation to the whole project scope...

Help Ticket Volume and Trends - Comprehending the fluctuations in ticket traffic is essential for managing personnel and allocating resources. Dashboards created by help desk software provide ticket traffic and trends, enabling teams to see trends, strategically assign people, and take proactive measures to resolve new problems as they arise...

Practice Staff Productivity and Performance - The effectiveness of employees is vital to any organization's success. KPIs and statistics that track employee productivity, such as the patient or client to staff ratio, appointment completion rates, and employee turnover, are often included in dashboards. Management may use these data to help them make well-informed choices on performance enhancement and workforce numbers...

Review and Rating Monitoring - Ratings and reviews on websites like Google, Yelp, and Amazon may have a significant impact on customer choices. These indicators are tracked by reputation management dashboards to measure client satisfaction. Positive evaluations with a larger volume indicate a solid reputation, while negative comments may be utilized to pinpoint areas that still need work...

Share of Voice KPI - In comparison to its rivals, a company's share of voice measures its significance in the media environment. This KPI provides information on a firm's market presence and its performance in standing out in a cutthroat environment by evaluating the percentage of media coverage a company obtains in comparison to its competitors in the industry...

Previous: Chart JavaScript