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:
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:
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);
        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);
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.
| 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. | 
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.