Articles in this section
Category / Section

How to enable or disable Auto-Refresh option in JavaScript embedded dashboard?

Published:

In JavaScript embedding, we have the option to enable or disable the autoRefreshSettings of the dashboard.

Follow these steps to enable or disable the auto-refresh feature:

  1. Locate the BoldBI.create() method in your JavaScript code. It should look similar to this:
this.dashboard = BoldBI.create({
    serverUrl: rootUrl + "/" + siteIdentifier,
    dashboardPath: "/Sales/Sales Analysis Dashboard",
    embedContainerId: "dashboard",
    embedType: BoldBI.EmbedType.Component,
    environment: environment == "enterprise" ? BoldBI.Environment.Enterprise: BoldBI.Environment.Cloud,
    width: '100%',
    height: window.innerHeight + 'px',
    expirationTime: 100000,
    authorizationServer: {
        url: authorizationServerUrl
    }
});
  1. Add the autoRefreshSettings member in the code.

  2. Set the enabled property of autoRefreshSettings to true. This will activate the auto-refresh functionality. Then add the property hourlySchedule holds three more properties hours for an hourly refresh, minutes for minute refresh, and seconds for second refresh. By simply enabling autoRefreshSettings refresh will be triggered every 30 seconds.

    autoRefreshSettings: {
        enabled: true,
        hourlySchedule: {               
            hours: 1,
            minutes: 10,
            seconds: 30
          }
    }
  1. Save your changes and reload the dashboard. The auto-refresh feature should now be enabled.
  2. You can disable it by setting the property autoRefreshSettings.enabled to false.
    autoRefreshSettings: {
        enabled: false
    }

For more information on the Bold BI JavaScript API, refer to the official documentation.

Additional 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