Spotfire® Mods

The Spotfire Mods framework makes it quick and easy to extend Spotfire with custom visualizations and actions tailored for specific domains and use cases.

You can enhance the base functionality in Spotfire with lightweight, shareable, and reusable components called mods. By combining Spotfire Mods with other built-in Spotfire capabilities, such as self-service data access, data wrangling, visual analytics, and advanced analytics, you can create highly customized analytic applications directly within the Spotfire environment.
Visualization mods
A Spotfire visualization mod is a custom visualization built with web technologies such as JavaScript and HTML and runs in a sandboxed iframe. Spotfire visualization mods look, feel, and behave like native Spotfire visualizations, and can be used without any knowledge of how they were implemented.

The visualization mod is integrated with Spotfire and responds to interactions in the same way as native visualizations do. For example, it is possible to drag a visualization mod to the visualization canvas, and configure it using standard axis selectors supporting the full Spotfire expression language. Capabilities such as filtering and marking works as usual across all visualizations, no matter if they are native visualizations or visualization mods. The user of the mod might not even notice there is a difference.

Action mods
A Spotfire action mod is a collection of actions (scripts) that are packaged together. Actions within a mod can be added to various controls and triggers in visualizations, as well as text areas as part of an analytic application, or they can be run ad hoc directly from the Actions flyout or from the Spotfire library. Triggers can be added to visualizations using the Action trigger card in the Visualization properties panel, or using drag-and-drop from the Actions flyout. Actions can be parameterized and thereby configured for different contexts, it is also possible to let the end user provide input at runtime.

Action mods use the comprehensive Spotfire API for accessing Spotfire analytic items and services, which allows for implementing actions such as:

  • Apply page layouts
  • Create and configure visualizations
  • Drill down or up in hierarchical data
  • Navigate to pages and visualizations
  • Run data functions and transformations
  • and much more
Developing mods
The mods development experience is designed to integrate well with Microsoft Visual Studio Code (VS Code) by providing default build tasks, debug target, and IntelliSense. During development, it is encouraged to use IntelliSense in VS Code to learn about available classes, methods, properties, etc in the Spotfire Mod APIs. When connected to a development server, changes in the source files will be automatically detected and updated in the mod in Spotfire.
Sharing and accessing mods
To share a mod with others, you can embed it in a Spotfire analysis and share the analysis, or save the mod itself to the Spotfire library, where others who have the right permissions can find it by browsing or searching for it from the Visualizations or Actions flyout. You can also share a separate .mod file via email, file shares, and public websites. On the Community Exchange, several mods are available for download. On the Spotfire Community you can find articles about submitting mods.

Saving mods to the Spotfire library allows users to pin mods to the Visualizations and Actions flyout. A pinned mod is available from all analyses, and the mod will be available as an option in all relevant contexts. The pinning of mods can also be centrally managed by an administrator. Another benefit from sharing a mod in the Spotfire library is that you will get automatic version handling of the mod. By default, if a mod is resaved to the Spotfire library, all instances of the mod are updated in all analyses, where it is used.

Trust framework
Running a mod involves code execution. Therefore, a concept of code trust has been introduced in the Spotfire environment. This code trust includes three different options:

  • A user can trust a specific version of a mod.
  • A specific mod can be trusted because it is signed, using cryptographic signatures, by a specific Spotfire user.
  • A specific mod can be trusted because it is signed by a certificate issued by a trusted certificate authority.
When a mod has been signed, any further changes to the mod code will change the hash sum of the mod and there will be a mismatch with what was signed, so any attempts to change the code by a third party should be detectable. See Trusting custom content in the Spotfire environment for more information about trust in general.
Copyright © 2023 Cloud Software Group, Inc. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of Cloud Software Group, Inc. nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.