Dundas Chart for SharePoint Send comments on this topic.
Working With Empty Or Missing Data
See Also

Glossary Item Box

Overview

Empty data points are points that do not have Y values. These data points are useful for controlling the appearance and structure of your chart's data, as well as handling points whose data is a null value.

 

Empty points can be used for:

An Example Using Empty Points

The following chart displays a daily sales report for one week. From the chart shown in Figure 1 below, no sales are recorded or shown for Wednesday. Is this because the amount of sales on Wednesday was zero, or was because of a holiday business closure for this day? If there were no sales recorded at all, and no explanation is offered as to why this is the case, then this is missing data.

 

Figure 1: Ambiguity over possible missing data on Wednesday.

 

Missing data can be represented as an empty point in the same way that empty points are used to represent nulls in a database field. Here is the same chart with an empty point used for Wednesday's data. As you can see in Figure 2, the ambiguity is removed by including the empty point in the chart's legend. Now we know that Wednesday was a holiday, and as such we should expect that no sales took place on that day.

 

Figure 2: No data due to a holiday.

Appearance of Empty Points

You can change the visual representation of plotted empty points by using the EmptyPointStyle property of the series that the point belongs to. Different attributes may be used, and depend only on the ChartType property of the series. The EmptyPointValue custom attribute can be used to treat empty points as zeros, or as an average of the points to the left and right of them.

 

For more information, refer to the topic on Custom Attributes.

Adding Empty Points

Empty data points can be added to a series using any of the following techniques.

 

To add an empty point to a data series, you can:

Using the InsertEmptyPoints Method

This function uses intervals along the x-axis to check if a data point exists for each of the intervals. If no point exists, an empty point is inserted.

 

Here are the parameters for the InsertEmptyPoints method:

 

Note
If an output series is specified by name, and a series by the same name does not exist in the chart's Series collection, then a new series will be created and added to the collection. The new series will have all of it attributes set to their default values.

 

Empty points can be simultaneously inserted into multiple series by specifying the names of those series in a comma separated list. 

 

Note
If a list of output series are specified, then the number of output series must equal the number of input series, or an exception will be thrown.

 

All series of the chart Series collection may be grouped together if "*" is specified as the input series name (in which case no output series should be specified).

See Also