Scripting Dashboard Charts

InetSoft's dashboard software allows users to script charts that represent complex data so the most subtle changes to be easily recognized. View the example below to learn more about the Style Intelligence solution.

Charts offer the same expression property scripting as other Viewsheet components. In addition, a comprehensive charting API gives scripting access to all aspects of a chart, including data binding, chart type, dimensions, measures, and aesthetics.

The following sections explain how to edit chart API scripts, and review the different aspects of charts that can be modified.

top ranked BI
Read how InetSoft was rated #1 for user adoption in G2 Crowd's user survey-based index.

To modify a chart using script, follow the steps below.

Do not select 'Plot Properties', 'Axis Prop­erties', etc.

  1. Right-click on the chart you wish to modify, and select 'Properties' from the context menu. This opens the 'Chart Properties' dialog box.
  2. Click the Script tab. Below the 'Script' panel, click the 'Edit' button. This opens the Formula Editor.
  3. In the Formula Editor, enter the desired script. For example, the following script creates a bar chart based on a Data Block called 'LimitedProducts'.
  4. Click 'OK' to close the Formula Editor, and click 'OK' to close the 'Chart Properties'.

The chart scripting API allows you to create a new chart from the ground-up. This requires several general steps, described below.

  1. Add a new Chart component to the Viewsheet.
  2. (Optional) Import the packages required by your script. You only need to import the packages that the script actually uses.
  3. Define the data: Define the dataset for the chart using the special keyword “dataset”.
  4. Create the Chart object. Create a new chart using the EGraph constructor and the special “graph” keyword.
  5. Create the chart data elements. Pass the field names (column headers) to a Graph Element constructor. This creates the representational elements for the chart.
  6. Add the elements to the Chart object. Pass the GraphElement object to the Chart's add Element() method. This adds the “bar” elements to the existing Chart object.
Previous: Dashboard Scripting