# spotfire-wrapper **Repository Path**: mirrors_TIBCOSoftware/spotfire-wrapper ## Basic Information - **Project Name**: spotfire-wrapper - **Description**: An Angular component packaged as custom elements that defined a new HTML element to display a Spotfire dashboard in a framework-agnostic way - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Wrapper for TIBCO Spotfire(R) - the Javascript library This is the home for the __Wrapper for TIBCO Spotfire(R)__ Javascript library. > ### Notes: > * Library can be found here: https://cdn.jsdelivr.net/gh/TIBCOSoftware/spotfire-wrapper/dist/spotfire-wrapper.js > * Visit [Angular package README](./projects/spotfire-wrapper/README.md) to read more about the Angular package alternate way. # Installation Wrapper for TIBCO Spotfire(R) provides a Javascript library that defines a new HTML tag to easily display a Spotfire dashboard in a standard HTML page : ``. Include the javascript files via cdn.jsdelivr.net and use `` tag as followed: ```html ``` `url` and `path` are mandatory. If `page` is missing, it displays the first available page of this `url/path`. You can add as many `` pair of tags as you want in the same page. ## Adjust the displayed Spotfire customization : ```html ```` Possible settings is listed here : * `"showAbout": true/false` * `"showAnalysisInformationTool": true/false` * `"showAuthor": true/false` * `"showClose": true/false` * `"showCustomizableHeader": true/false` * `"showDodPanel": true/false` * `"showExportFile": true/false` * `"showFilterPanel": true/false` * `"showHelp": true/false` * `"showLogout": true/false` * `"showPageNavigation": true/false` * `"showReloadAnalysis": true/false` * `"showStatusBar": true/false` * `"showToolBar": true/false` * `"showUndoRedo": true/false` ## Filter data at load: Loaded data can be filtered at the time the dashboard is first displayed: ```html ``` The code above would display rows extracted from Table `SalesAndMarketing` where its column `State` is `California` or `Arizona`. Multiple filters can be set. ## Marking: get selected data ```html


````

The code above will tell Spotfire(R) to provide values for columns `BCG segmentation` and `State` of table `SalesAndMarketing`.
The Javascript code right after the `` tag will register an event listener, and prints result in `
`.

If values of all columns shall be returned, `'{"SalesAndMarketing": ["*"]}'` need to be used.


---

## Demos

### Demo #0: Use <spotfire-viewer> in a raw HTML code:

see : https://github.com/TIBCOSoftware/spotfire-wrapper/tree/master/demo

After building the JS library (step below), run `cd demo` and `cp ../dist/spotfire-wrapper.js .`

Start a HTTP server :
```bash
python -m SimpleHTTPServer 4404
```
or
```bash
python3 -m http.server 4404
```

and navigate to `http://localhost:4404`, to see how to easily display a Spotfire dashboard in raw html pages.


---


## Builds

### Step #1: build the NPM package:

```bash
npm install
ng build spotfire-wrapper
(cd build/spotfire-wrapper/ ; npm pack)
cp -f build/spotfire-wrapper/tibco-spotfire-wrapper-X.Y.Z.tgz dist/spotfire-wrapper.tgz
```

### Step #2: build the Javascript library:
```bash
npm install ${PWD}/dist/spotfire-wrapper.tgz --no-save
npm run build:elements
cp -f elements/spotfire-wrapper.js ./build
```


### or a one line command ...
```bash
./build.sh
```

---

# License

  Copyright © 2019-2021. TIBCO Software Inc.

  This file is subject to the license terms contained
  in the license file that is distributed with this file.

  Please see LICENSE for details of license and dependent third party components referenced by this library, or it can be found here:

https://github.com/TIBCOSoftware/spotfire-wrapper/blob/master/LICENSE