# Sisense.JS API Reference

Sisense.JS is a Javascript-only embedding SDK for Sisense, which allows you to embed individual widgets from one or more Sisense dashboards into your web page/application.

Classes

# Using the SDK

# Prerequisites

# Importing the library

Include the sisense.js runtime file in your page as defined below where localhost:8081 should be your Sisense Web Server's URL and port.

<script type="text/javascript" src="http://localhost:8081/js/sisense.js"></script>

# AngularJS Support

  • In Sisense version 6.4 and later, Sisense.js supports Angular 2.x.
  • In Sisense version 6.5 and later, Sisense.js supports Angular 1.x and 2.x.

Angular 2.x heavily emphasizes loading templates asynchronously, which means some HTML content is loaded until later on. For Sisense.js to work, this HTML content should be loaded prior to connecting to the Sisense server through the sisense.connect function.

Sisense.js bootstraps a div element with the ID "sisenseApp" to ensure the sisenseApp element and other container elements are loaded before using the Sisense.connect function.

Example

<body>
  <!-- Your application's HTML -->
  <div id="sisenseApp">
      <!-- Widget container elements -->
  </div>
  <!-- Your application's HTML -->
</body>

# Add-on support

When embedding Sisense using the Sisense.js SDK, only widgets are being embedded. Thus, only add-ons (plugins) that apply to the widget level are supported.

Add-ons that affect the system UI or other scopes may have no effect, or have an undesireable effect on certain widgets if the add-on attempts to invoke APIs or components that are not available.

For example: The Funnel Widget add-on is compatible with Sisense.js because it is a widget type and can be embedded like any other widget; The Jump To Dashboard add-on is not compatible with Sisense.js because it is built to navigate to other dashboards, which do not exist in the Sisense.js scope.

# Additional References