Search results

Events

onActionStart

This event will be triggered at the beginning of every viewer action, including connection, layout and dashboard rendering, popup opening and closing, refreshing, filtering, exporting, and more.

Name Type Access Description
eventType enum get Will hold the current event type that triggered the event
source object get This will contain the data related to the current event as like below.
1. data
2. element
source.element object get Holds the current event site UI element. If there involves no UI element will be returned as null
source.data object get Holds the current event data.

Example

var dashboard = BoldBI.create({
     events:{
        onActionStart: function (args) {
          // Write a code block to perform an operation on beginning of every viewer actions 
        }
     } 
});
dashboard.loadDashboard();    

Event Types

Event Types Description
renderLayout This event will trigger when the layout of the dashboard started to render.
renderDashboard This event will trigger when the dashboard started to render.
renderWidget This event will trigger when the widget started to render.
resizeDashboard This event will trigger when we invoke the resize dashboard method or when you resize the browser window.
exportDialogOpen This event will trigger when the export dialog box opens, when you click on the export option in the context menu.
exportDialogClose This event will trigger when the export dialog box closes.
maximizeDialogOpen This event will trigger when the Maximize dialog box opens, when you click on the Maximize icon in the widget header.
maximizeDialogClose This event will trigger when the Maximize dialog closes.
filterOverViewOpen This event will trigger when the filter overview drop-down opens.
filterOverViewClose This event will trigger when the filter overview drop-down closes.
clearFilter This event will trigger when you clear the individual filter in the filter overview.
clearAllFilter This event will trigger when you clear all the filters in the filter overview drop-down.
clearWidgetFilter This event will trigger when you clear the filter in the widget.
exporting This event will trigger when the dashboard exporting gets started.

onActionComplete

This event will be triggered once all viewer actions have been completed.

Name Type Access Description
eventType enum get Will hold the current event type that triggered the event
source object get This will contain the data related to the current event as below.
1. element
2. data
source.element object get Holds the current event site UI element. If there involves no UI element will be returned as null
source.data object get Holds the current event data.

Example

var dashboard = BoldBI.create({
     events:{
        onActionComplete: function (args) {
          // Write a code block to perform an operation on every viewer action which completes 
        }
     } 
});
dashboard.loadDashboard(); 

Event Types

Event Types Description
layoutRendered This event will trigger after the layout rendering is completed.
dashboardRendered This event will trigger after the dashboard rendering is completed.
viewDataDialogOpen This event will trigger when the ViewData dialog box opens, when you click on the ViewData option in the context menu.
viewDataDialogClose This event will trigger when the ViewData dialog box closes.
exporting This event will trigger when the dashboard exporting gets started.
exportCompleted This event will trigger when the dashboard exporting gets completed.
clearFilter This event will trigger when you clear the individual filter in the filter overview and gets completed.
clearWidgetFilter This event will trigger when you clear the filter in the widget and gets completed.
Save This event will trigger once the Publish option is clicked in dashboard designer mode.
SaveAs This event will trigger once the Publish As option is clicked in dashboard designer mode.

beforeLayoutRender

This event will be triggered before the layout of widget is rendered in the mobile view. You will be able to resize a specific widgets or all widget item using the event.

Name Type Description
category string Specifies which category the widget belongs to, like Filters or Cards.
Id string Holds the current widget id.
model object Holds the dashboard viewer's object.
Name string Holds the current widget name.
size.MobileHeightFactor int Defines the scaling factor for widget height as a percentage.

Example

var dashboard = BoldBI.create({
     events: { 
        widget: {
            beforeLayoutRender: function (args) {
               // Write a code block to operate before widget layout renderd in the mobile view.
               // if (args.category === 'Filters') {
               // This doubles the height of the widget by setting MobileHeightFactor to 2
               //     args.size.MobileHeightFactor = 2;
               // }               
            }
        }
     }
});
dashboard.loadWidget("efbf2999-f7e7-4831-a492-53c4df394af0")();  

beforeToolBarItemsRender

This event will be triggered before the widget banner icons are rendered.

Name Type Access Description
type enum get Will holds the current event type that triggered the event
model object get Holds the dashboard viewer's object.
widgetInformation object get Holds the current triggered widget information as like below.
1. fontColor - Color of font in widget.
2. fontFamily - fontFamily of the text in the widget
3. type - Indicates the type of the widget like, grid, chart and so on,..
uniqueId string get Holds the current widget id.
iconsinformation array set Holds the information about the list of icons to be rendered in the dashboard.
isFilterWidget boolean get Holds the true, if the current widget is filter.
dashboardComment boolean get Holds the dashboardComment value.
enableComment boolean get Holds the enableComment value.
cancel boolean set Holds the cancel value of the current operation.

Example

var dashboard = BoldBI.create({
    events: {
        widget: {
            beforeToolBarItemsRender: function (args) {
                // Write a code block to perform an operation before the widget banner icons were rendered
            } 
        }
    }  
});
dashboard.loadWidget("efbf2999-f7e7-4831-a492-53c4df394af0")();        

beforeContextMenuRender

This event will be triggered after clicking the control menu icon from the widget banner.

Name Type Description
type Enum Will holds the current event type that triggered the event
model object Holds the Dashboard Viewer's Object.
header string Contains the title of the widget.
menuItem array Contains array value present in the widget control menu.
widgetId string Holds the id of the widget where the menu icon is clicked.
cancel boolean Holds the cancel value of the current operation.

Example

var dashboard = BoldBI.create({
     events: {
        widget: {
            beforeContextMenuRender: function (args) {
               // Write a code block to perform an operation after control menu icon from the widget banner is clicked.
          } 
        }
     }  
});
dashboard.loadWidget("efbf2999-f7e7-4831-a492-53c4df394af0")();        

onToolbarItemClick

This event is triggered when a user interacts with any item in the widget banner, including clicking an icon or selecting an option from the control menu.

Name Type Access Description
type enum get Will holds the current event type that triggered the event
model object get Holds the dashboard viewer's object.
target array get Contains the parent element of the selected icon.
name string get Contains the name of the icon clicked.
dashboardPath string get Holds the current dashboard path value.
headertext string get Contains the title of the widget.
event object get Returns the current click event information as like below.
1. type - It indicates the type of event, here it is click.
2. currentTarget - It indicates the current DOM element
widgetId string get Holds the id of the widget where the menu icon is clicked.
dataWidgetId string get Holds the id of the widget where the menu icon is clicked.
menu array Contains details of newly added button in widget control menu.
cancel boolean set Holds the cancel value of the current operation.

Example

var dashboard = BoldBI.create({
     events: {
        widget: {
            onToolbarItemClick: function (args) {
               // Write a code block to perform an operation after an icon from widget banner is clicked
          }
        }
     }  
});
dashboard.loadWidget("efbf2999-f7e7-4831-a492-53c4df394af0");