Labeling Time Series Data by Constant Interval
Time series data is data collected over time for a single or a group of variables. When using date series and time series values on the category (X) axis, it is often beneficial to see the chart with constant ranges rather than just what is in the data values. Missing values for weekends and holidays leaves gaps which distorts the chart and might lead to incorrect decisions.
The following example shows how to use a constant interval to label time series data on the category axis:
- Open the catalog file SampleReports.cat in
- Create a web report.
- Insert a chart in the web report which is based on WorldWideSalesBV in Data Source 1, displays in the Line 2-D chart type, shows Order Date on X-Axis and Total Quantity on Y Values.
- Right-click the chart in the report and select Format Filter from the shortcut menu to open the Edit Filter dialog.
- Select Add Condition to add a condition line, then select next to the field text box, select Order Date in the Orders Detail table of the View Element Resources dialog, and select OK to return to the Edit Filter dialog. Select >= from the operator drop-down list, then select next to the value text box, double-click 2015-01-06 in the Value tab of the Values dialog to select it, and close the dialog to return to the Edit Filter dialog.
- Repeat the step above to add another condition line and set the the condition to Order Date <= 2015-01-28. Specify the relationship between the two conditions as And.
- Select the View tab to view this chart, and it appears as follows:
- Select the Design tab to return to the design mode.
- Right-click the chart and select Format Axes > Format Category (X) Axis from the shortcut menu. The Format Category (X) Axis dialog appears.
- In the Tick Mark tab of the dialog, select the Minor Tick Mark sub tab, check Inside in the Type box to show the minor tick marks inside the axis, and then check Show Minor Tick Mark Labels in the Option box to show the minor tick mark labels.
- Select the Scale sub tab, check the Use Constant Interval option, then set the Minimum, Maximum, Major Unit and Minor Unit options to Fixed. Specify the minimum value to Jan 1, 2015 and the maximum value to Jan 29, 2015. Set the Major Unit and Minor Unit values to 1 and select the unit as Weeks and Days respectively which stand for 1 week and 1 day.
- In the Minor Label sub tab of the Format tab, select the format in the Stack box and select Remove to delete it. Select Date/Time from the Category box, input d in the Properties text box and select Add to add the format to the Stack box.
Then select OK to apply the settings.
- Double-click the line to bring out the Format Line dialog. In the Node tab, select Use Single Color, then select true from the Show Node drop-down list to show nodes on the line, and specify the node color to #000000. Select OK to accept the settings.
- Resize the chart, save the report and select the View tab, then the report will be shown as follows: