Search results

Methods

create()

This method will initialize the Dashboard Viewer options and returns the object for rendering the dashboard.

Example

var dashboard = BoldBI.create({
     serverUrl: "http://localhost:51777/bi/site/site1",
     dashboardId: "755e99c7-f858-4058-958b-67577b283309",
     embedContainerId: "dashboard_container",// This should be the container id where you want to embed the dashboard
     embedType: BoldBI.EmbedType.Component,
     environment: BoldBI.Environment.Enterprise,
     height: "800px",
     width: "1200px",
     authorizationServer: {
     url: "http://example.come/authorize/server"
     },
     expirationTime: "100000",     
});   

destroy()

This method will destroy the dashboard based on the dashboard object provided while calling the create method.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.destroy();   

getInstance()

This method will return the object of the rendered dashboard using the container id assigned to the dashboard options.

Example

<div id="container"></div> 
<script> 
     var dashboard = BoldBI.create({
     embedContainerId: "container",       
     });
     dashboard.loadDashboard();
     dashboard.getInstance("container");
</script> 

getWidgetData()

This method will help you to get the detail of the widget in a clientFnc method with arguments.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.getWidgetData(widgetName, clientFnc, dashboardId); // widgetName ->Define the name of the widget to get data, clientFnc -> It acts as a method, in this method only details of the widget are passed in an argument. , dashboardId -> Define the unique id of the dashboard if it is present within the multitab dashboard.

getWidgetInstance()

This method will used to get instance of that specific widget using Id. To get the widget details from specific dashboard, please refer this REST API.

Example

var dashboard = BoldBI.create(options);
var instance = BoldBI.getInstance("container"); // container -> embed container id
var widgetId = "2583540a-f970-41a1-9fc8-31c0581e7aa3"; // For getting widget ID, refer mentioned REST API in description.
var widgetInstance = instance.getWidgetInstance(widgetId);

setFilterParameters()

This method is used to set the filter parameters to the widget instance in the following cases.

  • Filtering without column name.
  • Filtering with one column name.
  • Filtering with more than one column name.

To know about widget ID of the specific widget, please refer this link.

To filter the widgets at initial rendering, you need to set filter parameters with widget instance like below.

Example for filtering without column name

var instance = BoldBI.getInstance("container"); // container -> embed container id
var widgetId = "201ce4b3-f2f9-4a3b-98e7-05b5ba01f2ca";
var filtersValue = ["Average", "Good"]; 
var widgetInstance = instance.getWidgetInstance(widgetId).setFilterParameters(filtersValue);

Example for filtering with one column name

var instance = BoldBI.getInstance("container"); // container -> embed container id
var widgetId = "201ce4b3-f2f9-4a3b-98e7-05b5ba01f2ca";
var filtersValue = ["Feedback=Average,Good"]; 
var widgetInstance = instance.getWidgetInstance(widgetId).setFilterParameters(filtersValue);

Example for filtering with more than one column name

var instance = BoldBI.getInstance("container"); // container -> embed container id
var widgetId = "32ed09f7-49ef-4468-9c56-ccc376dbcaaa";
var filtersValue = ["Product=Carnarvon Tigers","Company=Hanari Carnes" ]; 
var widgetInstance = instance.getWidgetInstance(widgetId).setFilterParameters(filtersValue);

hidePopup()

This method will hide the current dashboard waiting pop-up.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.hidePopup();

hideWaitingIndicator()

This method will be used to eliminate the waiting Indicator in dashboard embedding.

Example

var dashboard = BoldBI.create({
   actionComplete: function (args) {
      if (args.eventType === "renderLayout") {
         var instance = BoldBI.getInstance("container");//container -> embed container id
         instance.hideWaitingIndicator();
      }
   },
});
dashboard.loadDashboard();

Note: We have provided the hideWaitingIndicator method support to the dashboard and Multi-tab dashboard embedding.

loadDashboard()

This method will render the dashboard based on the dashboard options provided while calling the create method.

Example

var dashboard = BoldBI.create(options);
dashboard.loadDashboard();   

loadDashboardWidget()

This method will load the widget of current dashboard.

Example

var dashboard = BoldBI.create(options);
dashboard.loadDashboardWidget("Sales by country");   

loadDatasource()

This method will render the data source based on the data source options provided while calling the create method.

Example

var dashboard = BoldBI.create(options);
dashboard.loadDatasource();

loadDesigner()

This method will render the dashboard designer based on the dashboard options provided while calling the create method.

Example

var dashboard = BoldBI.create(options);
dashboard.loadDesigner();

loadMultipleWidgets()

This method will load multiple widgets of the current dashboard by a single instance call.

Example

<div id="widget1"></div> 
<div id="widget2"></div> 
<div id="widget3"></div>     
var dashboard = BoldBI.create({
   dashboardId: "5cb065f7-dabb-4b0c-9b45-c60a5730e963",
   widgetList: [{widgetName: "Medal details by Country", containerId: "widget1" },
   {widgetName: "Total Medals by Country", containerId: "widget2" },
   {widgetName: "Country", containerId: "widget3" }],
  });
dashboard.loadMultipleWidgets();

Note: To embed the required widgets, create a container in the client application where widgets will be rendered.

refreshDashboard()

This method will refresh the current dashboard.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.refreshDashboard();   

refreshWidgetData()

This method will refresh the particular widgets in the current dashboard.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.refreshWidgetData(widgetNames, hideLoader, dashboardId); // widgetnames ->Define the name of the widget to be Refresh , hideLoader -> Define whether to show or hide loading indicator while processing , dashboardId -> Define the unique id of the dashboard if it is present within the multitab dashboard.

resizeDashboard()

This method will resize the current dashboard.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.resizeDashboard();   

saveDashboard()

This method is used to publish the dashboard to the server with the dashboard name into the desired category and desired dashboard name.

  1. To Publish or Save the new dashboard.
  2. To Publish or Save the existing dashboard.
  3. To PublishAs or SaveAs the existing dashboard.
Parameter Type Description
publishModel object This object contains the following Parameters:
category Set the name of the category in the dashboard will be published.
categoryId Set the unique id of category in the dashboard will be published, the category Id taken from getDashboardCategories().
description Set the description in the dashboard will be published.
id Save the new dashboard - Dashboard Id value can be empty here.
Save the existing dashboard - Dashboard Id value should be valid.
SaveAs the existing dashboard - Dashboard Id value can be empty here.
isPublic Need to set the publish dashboard as public or not.
name Set the Name of the dashboard in the dashboard will be published.
containerId string Set the embed container id.

Example for Save the new dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
// For Save the New Dashboard case, Dashboard Id value is not needed
var publishModel = {category: "Sales",categoryId: "e6ed2f36-7205-423e-81e0-38a8ceb8e68c",description: "Published Using API",isPublic: false,name: "Publish API_01"}
instance.saveDashboard(publishModel, containerId);

Example for Save the existing dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
// For Save the Existing Dashboard case, Dashboard Id value is needed
var publishModel = {category: "Sales",categoryId: "e6ed2f36-7205-423e-81e0-38a8ceb8e68c",description: "Published Using API",id: '451e17e5-e59f-4090-84a2-cf5537876e59',isPublic: false,name: "Publish API_01"}
instance.saveDashboard(publishModel, containerId);

Example for SaveAs the existing dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
// For SaveAs the existing Dashboard case, Dashboard Id value is not needed
var publishModel = {category: "Sales",categoryId: "e6ed2f36-7205-423e-81e0-38a8ceb8e68c",description: "Published Using API",isPublic: false,name: "Publish API_01"}
instance.saveDashboard(publishModel, containerId);

NOTE: Customize the saveDashboard() in the dashboard designer using web application. To know more details, please refer to here.

updateDatasource()

This method will update the current data source page from the outside page.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateDatasource();   

updateFilters()

This method will update the filter parameters of current dashboard by the following cases.

  1. Filtering with URL Parameter.
  2. Filtering with Dashboard Parameter.
  3. Filtering with Combination of URL Parameter and Dashboard Parameter and vice-versa.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateFilters("Continent=Asia,Africa,Europe");   

Cases Syntax Example
URL Parameter {column_name}={value1},{value2},{value3}
var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateFilters("Continent=Asia,Africa,Europe");   

Dashboard Parameter {parameter_name}={parameter_value}
var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateFilters("Department_DP=Sales");

Combination Of URL Parameter and Dashboard Parameter {column_name}={value1},{value2},{value3}&&{parameter_name}={parameter_value}
var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateFilters("Continent=Asia,Africa,Europe&Department_DP=Sales");

Combination Of Dashboard Parameter and URL Parameter {parameter_name}={parameter_value}&{column_name}={value1},{value2},{value3}
var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.updateFilters("Department_DP=Sales&Continent=Asia,Africa,Europe");

updateWidgetFilters()

This method is used to update the dashboard with applied filter values in the On-Demand case. This would be used for any type of widget filtering cases.

Example for updating the widget filtered values in dashboard

var instance = BoldBI.getInstance("container");
var widgetId1 = "201ce4b3-f2f9-4a3b-98e7-05b5ba01f2ca";
var filtersValue1 = ["Feedback=Average,Good"]; //single column with filter values
instance.getWidgetInstance(widgetId1).setFilterParameters(filtersValue1);
var widgetId2= "32ed09f7-49ef-4468-9c56-ccc376dbcaaa";
var filtersValue2 = ["Product=Carnarvon Tigers","Company=Hanari Carnes"]; //multiple columns with filter values
instance.getWidgetInstance(widgetId2).setFilterParameters(filtersValue2);
instance.updateWidgetFilters("container"); //container -> embed container id

Note: Apply widget filters on both initial rendering and on-demand in the dashboard using a Web application. To know more details, please refer to here.

category

createDashboardCategory()

This method will be used Create an new category to server.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.createDashboardCategory(categoryName, categoryDescription, callBackFnc, containerId);
function callBackFnc(args)
{
   // The parameter args contains the status whether category is added or not.
}
Parameter Type Description
categoryName string Need to set the name to create a new category in the server.
categoryDescription string Need to set the description of new category.
callBackFnc string This method will act as call back function ,it will return the status of whether category is added or not.
containerId string Need to set embed container id.

NOTE: Customize the createDashboardCategory() in the dashboard designer using web application. To know more details, please refer to here.

getDashboardCategories()

This method will be used to get the dashboard categories from the server.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.getDashboardCategories(callBackFnc, containerId);
function callBackFnc(args)
{
   // The args parameter contains the list of categories available in the server as an array, which contains CategoryId and CategoryName
}
Parameter Type Description
callBackFnc string This method will act as call back function ,it will get the category list from the server.
containerId string Need to set the embed container id.

NOTE: Customize the getDashboardCategories() in the dashboard designer using web application. To know more details, please refer to here.

comment

addDashboardComment()

This method will add the comment to the respective dashboard.

Example for adding comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Adding dashboard comment", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.addDashboardComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while adding the comment in the normal dashboard.
}

Example for adding comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Adding multitab dashboard comment", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.addDashboardComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while adding the comment in the multitab dashboard.
}

Example for replying comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Replying dashboard comment", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", parentCommentId: "1"};
instance.addDashboardComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while replying the comment in the normal dashboard.
}

Example for replying comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Replying multitab dashboard comment", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", parentCommentId: "1", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.addDashboardComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while replying the comment in the multitab dashboard.
}
Parameter Type Description
addComment object The object contains the following parameters.
content Defines the comment you want to add.
dashboardId Defines the unique dashboard Id.
parentCommentId Defines the comment Id of the comment for which the reply comment is to be added. It should be defined only when adding a reply to the dashboard comment. For other cases, it should be null.
multitabDashboardId Defines the unique id of multitab dashboard. It should be defined only when adding multitab dashboard comment, for other cases it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the dashboard as arguments.

addWidgetComment()

This method will add the widget comment to the respective widget of the dashboard.

Example for adding widget comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Adding widget comment in normal dashboard", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.addWidgetComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while adding the widget comment in the normal dashboard.
}

Example for adding widget comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Adding widget comment in multitab dashboard", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.addWidgetComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while adding the widget comment in the multitab dashboard.
}

Example for replying widget comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Replying widget comment in normal dashboard", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", parentCommentId: "4"};
instance.addWidgetComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while replying the widget comment in the normal dashboard.
}

Example for replying widget comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var addComment = {content: "Replying widget comment in multitab dashboard", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", parentCommentId: "4", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.addWidgetComment(addComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while replying the widget comment in the multitab dashboard.
}
Parameter Type Description
addComment object The object contains the following parameters.
content Defines the comment you want to add.
widgetId Defines the unique widget Id.
dashboardId Defines the respective dashboard Id of the widget.
parentCommentId Defines the comment Id of the comment for which reply comment is to be added. It should be defined only when adding reply to widget comment, for other cases it should be null.
multitabDashboardId Defines the unique id of the multitab dashboard. It should be defined only when adding a multitab dashboard widget comment. For other cases, it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the widget as arguments.

deleteDashboardComment()

This method will delete the dashboard comment of the respective dashboard.

Example for deleting comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var deleteComment = {commentId: "3", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.deleteDashboardComment(deleteComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while deleting the comment in the normal dashboard.
}

Example for deleting comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var deleteComment = {commentId: "3", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.deleteDashboardComment(deleteComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while deleting the comment in the multitab dashboard.
}
Parameter Type Description
deleteComment object The object contains the following parameters.
commentId Defines the comment Id of the comment that you want to delete.
dashboardId Defines the unique dashboard Id.
multitabDashboardId Defines the unique id of the multitab dashboard. It should be defined only when adding a multitab dashboard comment. For other cases, it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the dashboard as arguments.

deleteWidgetComment()

This method will delete the widget comment of the respective widget of the dashboard.

Example for deleting widget comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var deleteComment = {commentId: "6", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.deleteWidgetComment(deleteComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while deleting the widget comment in the normal dashboard.
}

Example for deleting widget comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var deleteComment = {commentId: "6", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.deleteWidgetComment(deleteComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while deleting the widget comment in the multitab dashboard.
}
Parameter Type Description
deleteComment object The object contains the following parameters.
commentId Defines the comment Id of the comment that you want to delete.
widgetId Defines the unique widget Id.
dashboardId Defines the respective dashboard Id of the widget.
multitabDashboardId Defines the unique id of the multitab dashboard. It should be defined only when deleting multitab dashboard comments. For other cases, it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the widget as arguments.

editDashboardComment()

This method will edit the dashboard comment of the respective dashboard.

Example for editing comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var editComment = {content: "Edited dashboard comment", commentId: "2", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.editDashboardComment(editComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while editing the comment in the normal dashboard.
}

Example for editing comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var editComment = {content: "Edited multitab dashboard comment", commentId: "2", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.editDashboardComment(editComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while editing the comment in the multitab dashboard.
}
Parameter Type Description
editComment object The object contains the following parameters.
content Defines the comment you want to edit.
commentId Defines the comment Id of the comment that you want to edit.
dashboardId Defines the unique dashboard Id.
multitabDashboardId Defines the unique id of the multitab dashboard. It should be defined only when adding a multitab dashboard comment. For other cases, it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the dashboard as arguments.

editWidgetComment()

This method will edit the widget comment of the respective widget of the dashboard.

Example for editing widget comment in normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var editComment = {content: "Editing widget comment in normal dashboard", commentId: "5", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
instance.editWidgetComment(editComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while editing the widget comment in the normal dashboard.
}

Example for editing widget comment in multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var editComment = {content: "Editing widget comment in multitab dashboard", commentId: "5", widgetId: "7d118d8c-cee9-479e-befc-d2a46abc9aa5", dashboardId: "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
instance.editWidgetComment(editComment, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while editing the widget comment in thbe multitab dashboard.
}
Parameter Type Description
editComment object The object contains the following parameters.
content Defines the comment you want to add.
commentId Defines the comment Id of the comment that you want to edit.
widgetId Defines the unique widget Id.
dashboardId Defines the respective dashboard Id of the widget.
multitabDashboardId Defines the unique id of the multitab dashboard. It should be defined only when editing multitab dashboard comments. For other cases, it should be null.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the widget as arguments.

getComments()

This method will get the specific widget and dashboard comments from the Bold BI Server.

Example for getting normal dashboard comments

var instance = BoldBI.getInstance("container"); //container -> embed container id
var args = {'dashboardId': "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
var commentType= "dashboard";
instance.getComments(commentType, args, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while getting the specific dashboard comment.
}

Example for getting multitab dashboard comments

var instance = BoldBI.getInstance("container"); //container -> embed container id
var args = {'dashboardId': "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
var commentType= "dashboard";
instance.getComments(commentType, args, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the dashboard as arguments.
   // Write a code block to perform an operation while getting the specific dashboard comment from the multitab dashboard.
}

Example for getting widget comments from normal dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var args = {'widgetId': "7d118d8c-cee9-479e-befc-d2a46abc9aa5", 'dashboardId': "f3968817-f3e0-4747-9d7a-d89a6098bb12"};
var commentType= "widget";
instance.getComments(commentType, args, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while getting the specific widget comment from the normal dashboard.
}

Example for getting widget comments from multitab dashboard

var instance = BoldBI.getInstance("container"); //container -> embed container id
var args = {'widgetId': "7d118d8c-cee9-479e-befc-d2a46abc9aa5", 'dashboardId': "f3968817-f3e0-4747-9d7a-d89a6098bb12", multitabDashboardId: "59c94463-0da5-4cf5-a5a5-cbc3ed901ad6"};
var commentType= "widget";
instance.getComments(commentType, args, "callBackFnc");

function callBackFnc(args) {
   // It will return the updated comments in the widget as arguments.
   // Write a code block to perform an operation while getting the specific widget comment from the multitab dashboard.
}
Parameter Type Description
commentType string Defines the type of the comment whether it is dashboard or widget.
args object The object contains the following parameters.
widgetId Defines the unique widget Id. It should be defined only while getting widget comment.
dashboardId Defines the unique dashboard Id.
multitabDashboardId Defines the unique id of multitab dashboard. It should be defined only while getting multitab dashboard comment.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated comments in the dashboard as arguments.

export

exportDashboardAsExcel()

This method will export dashboard as excel.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'fileName':"",'fileType':""};

instance.exportDashboardAsExcel(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multi-tab dashboard, and it is mandatory for a multi-tab dashboard and an empty string for other cases.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
fileType Define the type of file to be exported ('xlsx','xls') and its an optional parameter of string type.

exportDashboardAsImage()

This method will export dashboard as image.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'fileName':"",'exportImageFormat':"",'resolutionDpi':"",'showAppliedFilters':};

instance.exportDashboardAsImage(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multi-tab dashboard, and it is mandatory for a multi-tab dashboard and an empty string for other cases.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
exportImageFormat Define the format of the image to be exported('jpg','png' and 'bmp') and its an optional parameter of string type.
resolutionDpi Define the resolution of the image (Integer value above 96) and its an optional parameter of integer type.
showAppliedFilters Define whether you need to export the dashboard with or without a filter, and it is an optional parameter of Boolean type.

exportDashboardAsPdf()

This method will export the dashboard as Pdf.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'fileName':"",'pageSize':"",'pageOrientation':"",'showAppliedFilters':};

instance.exportDashboardAsPdf(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multi-tab dashboard, and it is mandatory for a multi-tab dashboard and an empty string for other cases.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
pageSize Define the size of the page ('A3', 'A4', 'A5', 'Letter') and it is an optional parameter of string type.
pageOrientation Define the page orientation ('Landscape,' 'Portrait'), and it is an optional parameter of string type.
showAppliedFilters Define whether you need to export the dashboard with or without a filter, and it is an optional parameter of Boolean type.

exportWidgetAsCsv()

This method will export widget as Csv.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'widgetName':"",'fileName':""};

instance.exportWidgetAsCsv(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multitab dashboard and the widget id if it is present within the pinboard. It is mandatory for the multitab dashboard, pinboard, and empty string for other cases.
widgetName Define the name of the widget to be exported and it is a mandatory parameter of string type.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.

exportWidgetAsExcel()

This method will export widget as excel.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'widgetName':"",'fileName':"",'fileType':""};

instance.exportWidgetAsExcel(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multitab dashboard and the widget id if it is present within the pinboard. It is mandatory for the multitab dashboard, pinboard, and empty string for other cases.
widgetName Define the name of the widget to be exported and its a mandatory parameter of string type.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
fileType Define the type of file to be exported ('xlsx','xls') and its an optional parameter of string type.

exportWidgetAsImage()

This method will export widget as image.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'widgetName':"",'fileName':"",'exportImageFormat':"",'resolutionDpi':"",'showAppliedFilters':};

instance.exportWidgetAsImage(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multitab dashboard and the widget id if it is present within the pinboard. It is mandatory for the multitab dashboard, pinboard, and empty string for other cases.
widgetName Define the name of the widget to be exported and its a mandatory parameter of string type.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
exportImageFormat Define the format of the image to be exported('jpg','png' and 'bmp') and its an optional parameter of string type.
resolutionDpi Define the resolution of the image (Integer value above 96) and its an optional parameter of integer type.
showAppliedFilters Define whether you need to export the dashboard with or without a filter, and it is an optional parameter of Boolean type.

exportWidgetAsPdf()

This method will export widget as PDF.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container

var exportInformation ={'dashboardId':"",'widgetName':"",'fileName':"",'pageSize':"",'pageOrientation':"",'showAppliedFilters':};

instance.exportWidgetAsPdf(exportInformation);
Parameter Description
dashboardId Define the unique id of the dashboard if it is present within the multitab dashboard and the widget id if it is present within the pinboard. It is mandatory for the multitab dashboard, pinboard, and empty string for other cases.
widgetName Define the name of the widget to be exported and its a mandatory parameter of string type.
fileName Define the name of the file to be exported, and it is an optional parameter of string type.
pageSize Define the size of the page ('A3', 'A4', 'A5', 'Letter') and it is an optional parameter of string type.
pageOrientation Define the page orientation ('Landscape,' 'Portrait'), and it is an optional parameter of string type.
showAppliedFilters Define whether you need to export the dashboard with or without a filter, and it is an optional parameter of Boolean type.

pinboard

addWidgetToPinboard()

This method will add the widgets into the existing pinboard.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.addWidgetToPinboard(dashboardId, widgetId, widgetName);

loadPinboard()

This method will render the pinboard based on the provided pinboard name.

Example

var dashboard = BoldBI.create(options);
dashboard.loadPinboard();   

styles

addStyles()

This method will apply or refresh the styles of the dashboard, which instance created using the embed container Id.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.addStyles();

destroyStyles()

This method will remove the styles applied from the dashboard, which instance created using the embed container Id.

Example

var instance = BoldBI.getInstance("container"); //container -> embed container id
instance.destroyStyles();

view

deleteFilterView()

This method will remove the filter view from the dashboard.

Example

var instance = BoldBI.getInstance("dashboard"); //embedContainerId -> 'dashboard'
var viewId= "2182319f-2bb3-49ae-b05c-2bec3f03fd1f"; // Get the view id from the getViewsByDashboardId() API. For know more above the API, refer getViewsByDashboard().
instance.deleteFilterView(viewId, "callBackFunc");

function callBackFunc(viewId) {
   /* Add custom functionalities with the viewId for further actions */
}
Parameter Type Description
viewId string Defines the unique ID of the view.
callBackFnc string Denotes the callback method name that must be defined. It will return the view id of the view as arguments.

getViewByViewId()

This method will retrieves the information of a specific filter view.

Example

var instance = BoldBI.getInstance("dashboard"); //embedContainerId -> 'dashboard'
var viewId= "2182319f-2bb3-49ae-b05c-2bec3f03fd1f"; // Get the view id from the getViewsByDashboardId() API. For know more above the API, refer getViewsByDashboard().
instance.getViewByViewId(viewId, "callBackFunc");

function callBackFunc(view) {
   var itemId = view.ItemId; // Get dashboard id of the view
   var viewId = view.ViewId; // Get view id of the view
   var viewName = view.ViewName; // Get view name of the view
   var queryString = view.QueryString; // Get query string of the view

   /* Add custom functionalities with the above view details for further actions */
}
Parameter Type Description
viewId string Defines the unique ID of the view.
callBackFnc string Denotes the callback method name that must be defined. It will return the view details of the view as arguments.

getViewsByDashboardId()

This method will retrieve the filter view items of a specific dashboard.

Example

var instance = BoldBI.getInstance("dashboard"); // embedContainerId -> 'dashboard'
var itemId= "2db7d4eb-017d-4a3e-b567-d88cd8600d89"; // for multitab dashboard, need to set the active-tabbed child dashboard id.
instance.getViewsByDashboardId(itemId, "callBackFunc");

function callBackFunc(views) {
   var view = {};
   if(views != undefined) {
      views.forEach(data => {
         view["ItemId"] = data.ItemId, // Get dashboard id of the view
         view["ViewId"] = data.ViewId, // Get view id of the view
         view["ViewName"] = data.ViewName, // Get view name of the view
         view["QueryString"] = data.QueryString // Get query string of the view
      });

      /* Add custom functionalities with the above view details for further actions */
   }
}
Parameter Type Description
itemId string Defines the unique ID of the dashboard and for multitab dashboards, it must defines the active-tabbed child dashboard id.
callBackFnc string Denotes the callback method name that must be defined. It will return the dashboard views details as arguments.

saveAsFilterView()

This method will clone the existing filter view in the dashboard, saving it with a new name.

Note: Please refer to that knowledge base article here to get the viewName and QueryString from REST API by using ViewID.

Example for cloning an existing view of the normal dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]' // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
};
instance.saveAsFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}

NOTE: If you want to save the view as default for the embedded dashboard, the Default view option in Dashboard settings must be enabled. Learn more about default view here.

Example for cloning an existing view as default to the dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]', // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
   IsDefault: true // You can set your view as DefaultView after the default view option is enabled in dashboard settings in the Bold BI server. Otherwise, it will be false as the default value.
};
instance.saveAsFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}

Example for cloning an existing view of the multitab dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]', // Get the filter query string from the arguments of 'beforeSaveAsViewDialogOpen' event. For know more about the event, refer beforeSaveAsViewDialogOpen
   ChildItemId: instance._getActiveChildDashboardId() // Get the active-tabbed child dashboard id from BoldBI instance
};
instance.saveAsFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}
Parameter Type Description
viewParameters object The object contains the following parameters.
Parameter Type Description
ViewName string Defines the name of the view.
ItemId string Defines the unique ID of the dashboard.
QueryString string Defines the filter query associated with the view.
ChildItemId string Defines the unique ID of the active-tabbed child dashboard. It should only be defined when saving views in multitab dashboard. In other cases, it should be empty.
IsDefault string By default, it would be false. You can set as your view as DefaultView after the Default view option is enabled in Dashboard settings in the Bold BI server, otherwise view not saved as DefaultView of the dashboard.
callBackFnc string Denotes the callback method name that must be defined. It will return the cloned view details in the dashboard as arguments.

saveFilterView()

This method will save the filter view to the dashboard.

NOTE: Please refer to that knowledge base article here to get the viewName and QueryString from REST API by using viewId if view details already exist in Bold BI.

Example for saving view to the normal dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]' // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
};
instance.saveFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}

NOTE: If you want to save the view as default for the embedded dashboard, the Default view option in Dashboard settings must be enabled. Learn more about default view here.

Example for saving view as default to the dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]', // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
   IsDefault: true // You can set your view as DefaultView after the default view option is enabled in dashboard settings in the Bold BI server. Otherwise, it will be false as the default value.
instance.saveFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}

Example for saving view to the multitab dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewName: "Filter View", // view name
   ItemId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]', // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
   ChildItemId: instance._getActiveChildDashboardId(), // Get the active-tabbed child dashboard id from BoldBI instance
};
instance.saveFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewName = view.ViewName; // Get the view name of the saved view
   var viewId = view.ViewId; // Get the view id of the saved view
   var itemId = view.ItemId; // Get the item id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}
Parameter Type Description
viewParameters object The object contains the following parameters.
Parameter Type Description
ViewName string Defines the name of the view.
ItemId string Defines the unique ID of the dashboard.
QueryString string Defines the filter query associated with the view.
ChildItemId string Defines the unique dashboard ID of the active-tabbed child dashboard. It should only be defined when saving multitab dashboard views. In other cases, it should be empty.
IsDefault string By default, it would be false. You can set as your view as DefaultView after the Default view option is enabled in Dashboard settings in the Bold BI server, otherwise view not saved as DefaultView of the dashboard.
callBackFnc string Denotes the callback method name that must be defined. It will return the saved view details in the dashboard as arguments.

updateFilterView()

This method will update the existing filter view to the dashboard.

Example for update the existing view to the dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewId: "78ed603f-7834-4fc7-b611-3fe7ffdea399", // Get the view id from the arguments of 'beforeSaveViewDialogOpen' event while updating the view. For know more about the event, refer beforeSaveViewDialogOpen
   DashboardId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]' // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
};
instance.updateFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewId = view.ViewId; // Get the view id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}

Example for update the existing view as default to the dashboard

var instance = BoldBI.getInstance("dashboard"); // embedContainerID -> 'dashboard'
var viewParameters = { 
   ViewId: "78ed603f-7834-4fc7-b611-3fe7ffdea399", // Get the view id from the arguments of 'beforeSaveViewDialogOpen' event while updating the view. For know more about the event, refer beforeSaveViewDialogOpen
   DashboardId: instance.embedOptions.dashboardId, // Get the dashboard ID from the embedOptions 
   QueryString: 'filterQuery=[{"ucn":"Column1","cn":"ProductName","rn":"ComboBox2","ir":false,"ims":false,"fi":"92884626db4ffba31a49504a4864e4","ipw":false,"dimfi":{"c":"Include","t":["Product A"]}}]', // Get the filter query string from the arguments of 'beforeSaveViewDialogOpen' event. For know more about the event, refer beforeSaveViewDialogOpen
   IsDefault: true // You can set your view as DefaultView after the default view option is enabled in dashboard settings in the Bold BI server. Otherwise, it will be false as the default value.
};
instance.updateFilterView(viewParameters, "callBackFunc");

function callBackFunc(view, status) {
   var viewId = view.ViewId; // Get the view id of the saved view
   var statusMessage = status; // Get the status message of the saved view

   /* Add custom functionalities with the above response for further actions */
}
Parameter Type Description
viewParameters object The object contains the following parameters.
Parameter Type Description
ViewId string Defines the unique ID of the view.
ItemId string gDefines the unique ID of the dashboard, and for multitab dashboards, it must define the active-tabbed child dashboard ID.
QueryString string Defines the filter query associated with the view.
IsDefault string By default, it would be false. You can set as your view as DefaultView after the Default view option is enabled in Dashboard settings in the Bold BI server, otherwise view not saved as DefaultView of the dashboard.
callBackFnc string Denotes the callback method name that must be defined. It will return the updated view details in the dashboard as arguments.