Welcome to the public repository for Spotfire® Mods.
With Spotfire Mods, you can include custom visualizations in your Spotfire® applications much faster by integrating JavaScript visualizations. Create your own visualizations that look and feel like the native Spotfire visualizations, and that leverage the built-in capabilities of Spotfire.
Latest version of example projects
The mod examples are starting points for your own mod project. The following steps describe how to update an older mod to a newer API version:
- Copy new versions of the
spotfire-api-X-X.d.ts
andmod-schema.json
files into thespotfire
folder in your mod project, and remove the older ones. - Update the
apiVersion
property in yourmod-manifest.json
file to the version you want to use. - In TypeScript projects you might need to update the
paths
property in thetsconfig.json
file with the correct version.
The declaration file contains all new API features and each feature is documented with a @version attribute.
The Mods API is backwards compatible but not forwards compatible. Pick a Mod API version that matches your target Spotfire version.
Spotfire version | Mod API version |
---|---|
Spotfire 11.0 | 1.0 |
Spotfire 11.3 | 1.1 |
Spotfire 11.4 | 1.2 |
Spotfire 11.5 | 1.3 |
When a mod is trying to use newer API features without updating the apiVersion
in the mod-manifest.json
the following happens.
- Newer Properties are omitted in the Spotfire runtime. E.g this means that a 1.1 mod will never see an
isEditing
property on a RenderContext object. - Newer functions are available but throw a runtime error when invoked. The error message states the required API version to invoke the function without errors.
When a Spotfire analysis file with embedded mods is saved in its compatibility file format, the mod is replaced with a text area if the mod or its API version is not supported in the compatibility version.
Licensed under the 3-Clause BSD License.