Running connections after loading the dashboard

When you run a dashboard, the initialization message and a loading bar is shown. When initialization is finished the message disappears and the dashboard is presented and made available for usage.

Running connections after loading the dashboard

During initialization, all dashboard connections and queries are loaded by default when the Refresh Before Components Are Loaded option in the Usage tab of the Data Manager is set. This means that when you have one or more connections that require some time to load, the whole dashboard has to wait for them to finish. Only when all data is loaded is the initialization message removed and the dashboard can be used. Why not let users see the dashboard immediately and let it fill with data as soon as a connection has finished loading? Luckily, there is a workaround for this issue, as we will see in this recipe.

Getting ready

Use a dashboard with one or more Data Manager connections or Queries Browser queries.

How to do it…

  1. For the connection, go to the Data Manager, select the connection, and choose the Usage tab.
  2. For the query, select the query in the Query Browser, select Edit, and go to the Usage Options.

    Uncheck Refresh Before Components Are Loaded in the Data Manager...

    How to do it…

    …or in the Query Browser:

    How to do it…
  3. Now add a Refresh button. Add a Connection Refresh Button component for the connection or a Query Refresh Button component for the query to the canvas.
  4. In the General tab of the Refresh button, select the connections or queries you want to load.
    How to do it…
  5. Now go to the Behavior tab and check the Refresh After Components Are Loaded option.

    Tip

    You can also bind the Trigger Cell to a spreadsheet cell here to refresh the connections or queries when the bound cell value changes.

    How to do it…
  6. Since we only use this component to initially load the data after the dashboard components are loaded, we want to hide this component. Go to the Appearance tab and uncheck the Show Button Background option.
  7. Go to the Text tab and uncheck the Label option.

    Tip

    We set up the Connection Refresh Button and Query Refresh Button components here as automated background components, as we actually don't need the dashboard user to click and activate it. When the user accidentally moves over the component, the cursor will turn into a hand symbol, indicating a clickable action. To avoid this you could minimize the size of the component and locate it behind a logo or another part of the dashboard that is unlikely to be clicked.

How it works…

With this option, the dashboard components load and show up before the data loading is finished. This is more appealing to the user as they can see something happening instead of watching the dull initialization message. We can also use this to initially load only the data that is required for the first or initial screen of the dashboard, while the other data (that even might require some more time to load) is loaded in the background or only after a user triggers it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset