Parameterizing your Dashboard

It’s possible to customize the look and behavior of an analysis simply by passing in parameters on the link.

The URL of an analysis can be customized to include instructions for altering the initial state of the analysis. This can be used to:

  • Toggle the display of various UI elements such as toolbars, headers and page navigation
  • Hide default menu options
  • Apply bookmarks
  • Set filters & marking
  • Set document properties
  • Set the starting page of the analysis

For toggling UI elements, append the “options” argument to the analysis URL. For example, the following can be used to hide the status bar and page navigation:

&options=2-0,4-0

or, each option can be set to “1” to turn on the item. Here is a list of available options and their respective codes.

Header 1
Status bar 2
Toolbar 3
Page navigation 4
Filter panel 5
Details on demand 6
UndoRedo 7
Export visualization image 8
Analysis information 9
Download as DXP file 10
Help 11
About 12
Close 13
Logout 14
Edit button 15

Click here for an example of a Spotfire Cloud analysis where the status bar and toolbar have been removed.

In addition to the options above, additional attributes can also be customized by passing in a Configuration Block. Configuration Blocks are used to provide even more control over the initial state of the analysis. Click here for a full reference on Configuration Block options. Here are some examples:

Set the starting page &configurationBlock=SetPage(pageTitle = “My Page”);
Set a filter &configurationBlock=SetFilter(columnName=”State”,values={“VERMONT”});
Set a document property &configurationBlock=weightingFactor=1000;

All of these options can be combined to create a custom view. Click here to see the same Spotfire Cloud analysis that has been configured to display only a single visualization with no navigation options.

Embedding with Parameters

This same strategy can also be used to embed customized views directly in a web page. This can be done simply by appending the customization arguments to the iFrame’s URL. One example of this can be found at the Pay Perspective site, found at www.payperspective.com. This site uses a Spotfire Cloud analysis that has been rendered without the default page decoration, resulting in a customized and branded UI.

Here is a similar example embedded into this page. This example embeds a customized view of Spotfire Cloud analysis. The original view can be seen here.

For even more control of embedded content, Spotfire’s JavaScript API can be used. Instead of just setting the initial state, the JavaScript API can be used to dynamically change the state of the analysis after it’s been loaded. This can be used to pass events into (or out of) the analysis, allowing for the creation of a dynamic user-driven custom application. More information on Spotfire’s JavaScript API can be found here.