Articles in this section
Category / Section

How to create and edit dashboards in embedded application?

Published:
In JavaScript embedding, we have the option to create a dashboard and edit the specific dashboard. Here, we are going to demonstrate creating and editing a specific dashboard using JavaScript-based embedding. 

Steps to create a dashboard in an embedded application:
  1. We have embedded samples on different platforms, you can download them from the help documentation. In the provided sample, by default, the dashboard renders in view mode. To create the dashboard using the downloaded sample, change the BoldBI.create() method like in the below code snippet.



    function renderDashboard() {
        this.dashboard = BoldBI.create({
            serverUrl: rootUrl + "/" + siteIdentifier,
            embedContainerId: "dashboard",
            mode: BoldBI.Mode.Design,
            embedType: BoldBI.EmbedType.Component,
            environment: environment == "enterprise" ? BoldBI.Environment.Enterprise : BoldBI.Environment.Cloud,
            width: "100%",
            height: "100%",
            expirationTime: 10000,
            authorizationServer: {
                url: authorizationServerUrl
            }
        });
        console.log(this.dashboard);
        this.dashboard.loadDesigner();
    };
            
           

      2. Once you make these changes, run the embedded application to create a dashboard.

Steps to edit the existing dashboard in an embedded application:
  1. To edit the dashboard in an embedded application, get the dashboard ID from the Bold BI server and provide this value in "dashboardId" API then change the renderDashboard() method like in the below code snippet.
  2. function renderDashboard() {
        this.dashboard = BoldBI.create({
            serverUrl: rootUrl + "/" + siteIdentifier,
            dashboardId:"367298c3-473d-4c53-aef0-ff91099945a2",
            embedContainerId: "dashboard",
            mode: BoldBI.Mode.Design,
            embedType: BoldBI.EmbedType.Component,
            environment: environment == "enterprise" ? BoldBI.Environment.Enterprise : BoldBI.Environment.Cloud,
            width: "100%",
            height: "100%",
            expirationTime: 10000,
            authorizationServer: {
                url: authorizationServerUrl
            }
        });
        console.log(this.dashboard);
        this.dashboard.loadDesigner();
    };
            
      2. Once you make these changes, run the embedded application to edit a dashboard.


Related topics:


Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Soundarya Mani Meharan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied