Category / Section
Refreshing a Specific Widget in a JavaScript-Embedded Dashboard
Published:
In some cases, you may want to refresh a particular widget or multiple widgets in an embedded dashboard. This can be achieved using the refreshWidgetData
method. This method can be invoked on-demand to refresh the widget data.
Refreshing a Widget
To refresh a specific widget, follow these steps:
- Add the following code snippet to your embedded application:
var instance = BoldBI.getInstance("container"); // container -> embed container id
instance.refreshWidgetData(widgetNames, hideLoader, dashboardId);
widgetNames
: Define the name of the widget to be refreshed. This should be an array of strings.hideLoader
: Define whether to show or hide the loading indicator while processing. This should be a Boolean.dashboardId
: Define the unique ID of the dashboard if it is present within a multi-tab dashboard.
- Invoke the method on-demand to refresh the widget data.
By following these steps, you can refresh a specific widget or multiple widgets in a JavaScript-embedded dashboard.