416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

Refresh a Data Control

Hide navigation
RSS
Modified on Fri, 31 Aug 2012 05:22 PM Categorized as Script Library
Click to return to: Dundas Dashboard Script Library


Overview

By default, a performance data visualization control (e.g. chart, gauge, data grid) on your dashboard will not update itself if the underlying KPI/dataset data is changed. You can turn on the auto-refresh feature to have the control update itself periodically, or you can force the control to refresh its data by calling its Refresh() method via scripting as shown below.

Setup

Follow these steps:

  1. Drag a KPI from the Toolbox to the Canvas. The KPI is displayed as a bar chart, BarChart1.
  2. Drag a Button from the General Controls folder to the Canvas.
  3. Set the Button's Text property to Refresh.

Script

Add the following script to the Button's Click interaction:

BarChart1.Refresh();


Note: When the refresh method is called, the DV control won't be updated in the next line of code. If you need to perform some handling after the DV has updated, use for example the chart's On Data Changed Interactions property.

Testing

To test the refresh method:

  1. Save and check-in the dashboard.
  2. View the dashboard.
  3. Cause a change in the underlying data that is driving the KPI (e.g. by manipulating database/data source values).
  4. Click the Refresh button on the dashboard to see the updated data.

Click the button to refresh the data displayed in the chart.

Click the button to refresh the data displayed in the chart.


Related topics




About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.