JavaScript API Embed


JavaScript API is the option to create an embeddable JavaScript code from chart or dashboard and use the code snippet in other HTML applications to render the chart/dashboard, below example shows the chart settings but the same applies to dashboards.


  • Enter the embed name.
  • Select JavaScript API as the option.
  • Click Save.
  • You will be redirected to the Embed Settings page.
  • Click Save. Go back to settings and click on Code Snippet.
  • Copy the URL.



  • Before the Embedding the code snippet in HTML page, include the splashbi.js file from SplashBI server to support loading of Chart/Object using JavaScript API, line of code to use in HTML page is given below.

  • Embed the JavaScript code snippet in Client Application HTML page, Example HTML code snippet is show below.


  • Paste the URL copied in clip board.



Security Options

OAUTH2



To know more about OAuth2 security creation refer OAuth2 Settings. Selecting this security option will enable a security wall that requires an OAuth2 security access for the user to view the dashboard/chart.


  • Embed the iFrame code snippet in Client Application HTML page, Example HTML code snippet is show below.


  • Paste the URL copied in clip board. The user will be redirected to the chart/dashboard.


NOTE: Selecting JavaScript will disable Login Form.