Handling no data and data errors

Contents[Hide]

1. Overview

At viewing time, if you filter a data visualization such that no data is returned (or a data error occurs), you'll see a corresponding message displayed by the visualization instead of a blank area. For each data visualization, you can add an interaction when a No Data event or a Data Error event occurs. This allows you to show/hide layers of content or execute some custom script when these events occur.

2. No data indicator

As an example, consider the following dashboard consisting of a chart and a calendar range filter.

Dashboard with a chart and filter
Dashboard with a chart and filter

In View mode, set the calendar range of the filter to a value for which there is no data (e.g., 2004 to 2004).

Instead of showing a blank chart, you see a no data was returned indicator.

Chart indicates no data was returned
Chart indicates no data was returned

There are three data-related events that can occur for data visualizations. For each of these events you can add an action to run such as Change Layer or script. For example, if No Data occurs for a chart, you may want to hide the chart and associated labels completely.

You can find these in the Properties window of any data visualization in the Actions section:

  • Data Change - Occurs when the data visualization control's data changes in any way. This will always fire before No Data and Data Error.
  • No Data - Occurs when the control doesn't receive any data back.
  • Data Error - Occurs when the control's data changes, and the data has an error and cannot be shown.

To choose an action to add, click the menu icon to the right.

Add a Change Layer action on No Data event
Add a Change Layer action on No Data event

To quickly add a script action, click the + button.

Add a No Data script action
Add a No Data script action

4. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri