Live Chat Icon For mobile
Hugo Morris

Chat with the Bold BI Sales team now!

Live Chat Icon
Event Handling > Rendering Dashboard
Rendering Dashboard
This sample describes the events that can be handled while rendering an embedded dashboard using JavaScript events.
How can you explore?
The Enable Rendering Event option lets you enable the events associated with dashboard rendering. The Event Trace shows the events triggered while rendering a dashboard. To explore this functionality, enable the Enable Rendering Event option and click Apply. This will re-render the current dashboard and log the event traces in the Event Trace window in the properties panel.

Click to apply any setting changes above.


Code snippet that enables this functionality.

    function renderDashboard() {
        var boldbiEmbedInstance = BoldBI.create({
            // Write a code block to perform an operation before the dashboard context menu is rendered.
            // Here we show an example of adding a new item to the dashboard context menu.
            beforeContextMenuRender: function(args){
                var value = { id : "customoption", text: "Custom Option" };

            // Here we show an example of which banner Icon is clicked based on the ID.
            dashboardSettings: {
                onIconClick: function (args) {
                    if(args.event.ID == "customoption")
                        // Write a code block to perform an operation after a banner icon or context menu option is clicked.