Visualization mod development
Although Spotfire offers many different visualization types, you might miss a certain way to visualize your data. To fill that gap, Spotfire provides a framework making it possible for a developer to extend Spotfire with new customized visualizations. Through the provided Spotfire mod API, these customized visualizations can be created using JavaScript or TypeScript, and they are called visualization mods.
The area chart below is an example of a visualization mod that has been created using this framework.

How does a visualization mod work?
You can think of a visualization mod as a visualization, whose appearance is specified by the mod developer who created the visualization mod, but still all data related functionality is handled in the same way as in any of the native Spotfire visualizations. An end user feels that the visualization mod is integrated with Spotfire, because the visualization 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 change what is selected on the various visualization axes. Moreover, filtering of the data works as usual across all visualizations, no matter if they are native visualizations or visualization mods. The end user might not even notice there is a difference.
The visualization mods can be based on any of the data sources supported by Spotfire; in-memory data, in-database data, streaming data, and data-on-demand.
Sharing visualization mods with others
- saved to the Spotfire
library.
Once saved to the library, the visualization mod can be added to analyses and also pinned to the visualization flyout. Users can browse and search the library for visualization mods.
- embedded in an analysis.
The analysis can then be saved to the library, or saved as a local file.
Developing visualization mods
A developer of a visualization mod needs a running instance of a Spotfire client, and a source code editor. Examples of visualization mods, which can serve as starting point for developers, are available for download from Spotfire Mods on GitHub. The examples to download are built using the Visual Studio Code editor. When using Visual Studio Code as editor, it is possible to get a live preview of the mod within the Spotfire client while developing.
For more information about the actual development and the tools, see Getting Started.
Version handling
By default, if a visualization mod is resaved to the Spotfire library, all instances of the visualization mod are updated in all analyses, where it is used.
See also Manage trust.
- Getting started with visualization mod development
To get started, a developer of a mod needs a running instance of a Spotfire client, and a source code editor. Examples of visualization mods, which can serve as starting point for developers, are available for download. The examples are built using the Visual Studio Code editor, and it is possible to get a live preview of the mod within the Spotfire client while developing. - Saving a visualization mod to the library
You can save a visualization mod to the library. - Adding a visualization mod to the visualization flyout
Visualization mods that have been saved to the library can be pinned, which means they are added next to the list of native visualizations in the Visualization types flyout. Once a visualization mod is part of the visualizations list, it becomes available for selection also in future analyses. In addition, the visualization mod will appear as a choice whenever you select a visualization type, for example, when you want to switch to another visualization or create a details visualization. - Opening a visualization mod that is saved locally
A visualization mod can be saved as a .mod file and then distributed between users, via, for example, email or by publishing it on websites. You can download and save such a .mod file locally, and then open the visualization mod in an analysis. - Turning off/turning on development for visualization mods
A puzzle icon in the visualization mod title indicates that you are able to develop the mod, and you click it to access the development popup. If the puzzle icon is not visible, development is turned off. - Manage trust
Many Spotfire users want to extend the Spotfire environment in different ways. When allowing custom code to run within an analysis, or when enabling direct interaction with other systems, it is important to consider security. Any custom item created by a malevolent person could potentially perform unexpected or undesired actions. Therefore, Spotfire uses different trust mechanisms to help you to keep your system safe. - Review visualization mod
A visualization mod is a visualization that has been developed by someone else than Spotfire. You might see the question of whether or not you trust the visualization mod when trying to add a new visualization.