Handling no data and data errors

Contents[Hide]

1. Overview

At viewing time, if no data is returned for a visualization or if 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.

Tip
Data error details can be hidden from end users by enabling the advanced configuration setting Hide Error Stack Traces, with the full details available in the logs.

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 your own 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's data changes in any way after initially loading. 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 + or menu icon to the right.

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

Setting up interactions is described in more detail in the article Using interactions.

4. See also

Dundas Data Visualization, Inc.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

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