InetSoft Product How-To: Controlling Dashboard Features

To alter the appearance of chart axes, use the Chart's setScale() method to assign a new Scale object. For example, you can replace a linear scale with a logarithmic scale, show or hide tick marks, display axis labels at top or right, change the label font and color, etc. Consider the following example:

#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index.
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.data)
 
var arr = [["State","Quantity"], ["NJ",200], ["NY",3000]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
graph.addElement(elem);
This creates a basic bar chart displaying the dimensions 'State' and 'Quantity'.

Follow the steps below to experiment with modifying the chart's axes:

  1. Create a new logarithmic scale using the LogScale object, specifying 'Quantity' as the field on which the scale is based.
var logscale = new LogScale('Quantity');
  1. Set the color of the Y-axis lines and gridline to blue, and make the gridlines dotted. To do this, create a new AxisSpec object, and assign it to the Scale.
 var yspec = new AxisSpec();
 yspec.setLineColor(java.awt.Color(0x0000ff));
 yspec.setGridColor(java.awt.Color(0x0000ff));
 yspec.setGridStyle(GraphConstants.DOT_LINE);
 logscale.setAxisSpec(yspec);
  1. Create a new CategoricalScale for the X-axis, specifying 'State' as the field on which the scale is based.
 var cscale = new CategoricalScale('State');
  1. Remove the X-axis lines and tick marks. To do this, create a new AxisSpec object, and assign it to the Scale.
 var xspec = new AxisSpec();
 xspec.setLineVisible(false);
 xspec.setTickVisible(false);
 cscale.setAxisSpec(xspec);
  1. Move the X-axis labels above the chart area, and increase their size. To do this, create a new TextSpec object, and assign it to the AxisSpec.
 var tspec = new TextSpec();
 tspec.setFont(java.awt.Font('Dialog',
               java.awt.Font.BOLD, 14));
 xspec.setTextSpec(tspec);
 xspec.setAxisStyle(AxisSpec.AXIS_SINGLE2);
  1. Create a new TextFrame, and specify new axis labels to replace the default labels ('NJ', 'NY') with the full state names. Assign the new TextFrame to the AxisSpec object.
 var tframe = new DefaultTextFrame();
 tframe.setText('NJ','New Jersey');
 tframe.setText('NY','New York');
 xspec.setTextFrame(tframe); 
  1. Assign the two Scale objects to the appropriate axes of the graph object.
 graph.setScale('Quantity',logscale); graph.setScale('State',cscale);

The complete script is shown below:

importPackage(inetsoft.graph)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.data)
 
var arr = [["State","Quantity"], ["NJ",200], ["NY",3000]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var logscale = new LogScale('Quantity');
var yspec = new AxisSpec();
yspec.setLineColor(java.awt.Color(0x0000ff));
yspec.setGridColor(java.awt.Color(0x0000ff));
yspec.setGridStyle(GraphConstants.DOT_LINE);
logscale.setAxisSpec(yspec);
var cscale = new CategoricalScale('State');
var xspec = new AxisSpec();
xspec.setLineVisible(false);
xspec.setTickVisible(false);
cscale.setAxisSpec(xspec);
var tspec = new TextSpec();
tspec.setFont(java.awt.Font('Dialog',
              java.awt.Font.BOLD, 14));
xspec.setTextSpec(tspec);
xspec.setAxisStyle(AxisSpec.AXIS_SINGLE2);
var tframe = new DefaultTextFrame();
tframe.setText('NJ','New Jersey');
tframe.setText('NY','New York');
xspec.setTextFrame(tframe);
graph.setScale('Quantity',logscale);
graph.setScale('State',cscale);
graph.addElement(elem);
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.

InetSoft API: Features Controllable Programmatically

InetSoft Style BI exposes a rich API surface that enables embedding, automation, and extension of the BI layer inside custom applications. The API provides deep control over visuals, data connections, security, scheduling, and runtime behavior — making it well suited for embedded, multi-tenant, or global deployments where dashboards must react dynamically to context, users, and devices.

Key features accessible via API

Feature What can be done programmatically Why it matters
Embedding / White-label Embed dashboards in external portals; programmatically control container, look & feel, visible tools, and access options. Delivers seamless analytics inside partner or internal portals without separate app logins or training.
Visualization element control Scripted control of chart elements, sizing, show/hide widgets, dataset substitution, and runtime property changes. Enables dynamic visuals that update to business context (e.g., switching mineral type or site).
Data integration & mashup Define or bind data blocks, switch data sources, call queries, and orchestrate mashups across disparate sources. Permits direct connection to operational DBs, cloud warehouses, REST APIs and lab systems without heavy staging.
Scheduling / exports / bursting Programmatically schedule report runs, export to PDF/Excel/CSV, and trigger burst deliveries to user groups. Automates operational reporting and reduces manual distribution work for global stakeholders.
User, role & data security Manage users and roles, integrate SSO contexts, and enforce row/cell-level permissions via API-driven tokens and policies. Essential for multi-jurisdiction deployments where data access must be strictly controlled.
Dynamic parameterization / filters Supply runtime filters, URL tokens, and programmatic parameters so dashboards load with pre-applied context. Makes dashboards context-sensitive and friendly for embedded portals or device-specific views.
Runtime layout & behavior Adjust layout containers, alter drill paths, enable/disable interactions, and hide or reveal UI elements on demand. Helps tailor the UX to role, device, or partner branding without rebuilding dashboard templates.
Caching, refresh & monitoring Control cache warming, refresh intervals, and pull usage or performance metrics programmatically. Supports predictable performance under concurrency and enables operational monitoring for scale.

My opinions and observations

The API surface is intentionally broad: embedding, mashup, and white-labeling are emphasized, which is ideal for organizations that need to integrate BI directly into customer portals or partner apps. The API is strongest where automation and context propagation are required — filtering, data binding, scheduled exports and security are the most practical API-driven features.

Designer tasks such as complex layout composition and pixel-perfect styling are usually faster through the visual UI; the API shines for automation, runtime variability, and programmatic control over behavior. For maintainability, it is wise to separate what remains static (dashboard templates and core visuals) from what becomes dynamic (filters, data bindings, exports, and feature toggles).

For global rollouts, programmatic control over locale, data source swapping, and access tokens is a strategic advantage. However, over-automation of layout and micro-tweaks can create maintenance overhead, so adopt an “API for behavior + UI for design” pattern.

Learn about the top 10 features of embedded business intelligence.

Specific use-case examples (applicable to a global extraction business)

  • Site-scoped embedding: The portal issues a secure token containing siteID; the embedded dashboard receives that token and the API auto-applies site filters so the site manager sees only local KPIs.
  • Nightly automated snapshots: An overnight job triggers the report API to generate PDFs of the “Mining Operations Snapshot” and bursts them to region managers across time zones.
  • Mobile-first lab view: The JavaScript embed API hides heavy shipment widgets and rearranges layout blocks when a lab technician opens the dashboard on a phone.
  • Seamless data migration: When Chile migrates to a new warehouse, the central BI script rebinds the data block to the new source, refreshes caches, and keeps embedded dashboards unchanged for end users.
  • Partner portal with restricted view: A supplier login receives a white-labelled embed in which the API disables export and hides non-relevant widgets, enforcing read-only access to that supplier’s lots.
  • Usage telemetry for billing: Pull usage logs programmatically into a central billing dashboard to measure hits, export counts, and slow queries used for capacity planning and chargeback.

Important considerations and caveats

  • Performance & concurrency: Heavy API-driven dashboards require caching, pre-aggregations, and possibly edge data copies for remote low-bandwidth sites. Test at scale before wide rollout.
  • Design vs automation boundary: Use the API for behavior and context; use the UI for visual design. Over-automating layout changes leads to hard-to-maintain dashboards.
  • Versioning and backward compatibility: Maintain stable API contracts for embedded clients. If templates or parameter names change, coordinate rollouts to avoid breaking partner portals.
  • Governance & security: Enforce row-level security and token scoping. Validate that programmatic filters cannot be tampered with to access unauthorized data.
  • Operational skills: Ensure the team understands the JavaScript SDK and REST endpoints, and document which parts of the experience are automated versus manually maintained.
We will help you get started Contact us