Articles in this section
Category / Section

How to use the preconfigured widgets for dashboard designing in JavaScript embedding?

Published:

Using Pre-configured Widgets in Dashboard designing in JavaScript embedding

When working with an embedding application for dashboard designing, you may want to utilize the widgets that are already present in existing dashboards. This can be achieved by using the API member preConfiguredWidgets with the respective dashboard Id and category name in BoldBI.create() method in your embedding application.

Here is a code snippet to illustrate this:

var dashboard = BoldBI.create({
     preConfiguredWidgets: {
          dashboardId:"",
          categoryName: "",
     }
});
dashboard.loadDesigner();

The above code can be used in the dashboard design mode or dashboard create mode, dashboardId is the ID of the dashboard from which the list of widgets was retrieved. The categoryName specifies the category name to be displayed on the left panel of the dashboard designer page. If you do not specify the Category name, the respective widgets will automatically be displayed in the “Miscellaneous” category.

Example

function renderDashboard() {
   var dashboard = BoldBI.create({
       serverUrl: rootUrl + "/" + siteIdentifier,
       dashboardId: "f0a40bcc-3a10-452a-ba23-201249cecac7",
       embedContainerId: "dashboard",
       environment: environment == "enterprise" ? BoldBI.Environment.Enterprise: BoldBI.Environment.Cloud,
       mode: BoldBI.Mode.Design,
       preConfiguredWidgets: {
           dashboardId: "0b5b697f-d360-482a-9a67-3143b18724e4",
           categoryName: "Testing",
       },
       authorizationServer: {
           url: authorizationServerUrl
       },
     
   });
   dashboard.loadDesigner();
  
};

image.png

This method allows you to efficiently use and manage your widgets, enhancing your dashboard design and functionality.

References

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