How to create an interactive stacked bar chart
Summary
Before you begin, read Preparing to create and use interactive charts.
Figure 1 shows an example of a stacked bar chart that shows how work was resolved by operators. The data is sorted by operator and displayed in a stacked bar that shows how many of an operator's resolved work items are Resolved-Completed, Resolved-Approved, and Resolved-Rejected.
Figure 1. Example stacked bar chart: Work Items Resolved by Operator
Suggested Approach
To create a report like the one in Figure 1, complete the following steps:
1. Run the Report Wizard to create the report. For this example, the developer specified one organization unit as the report criteria (pyResolvedOrgUnit is equal to UServ), grouped the data by the operator who resolved the item (pyResolvedUserID) and work status (pyStatusWork), and counted the records.
2. In the Charts form of the Wizard, select the chart option and click the Configure Interactive Charts button.
3. In the Interactive Charts window, from the Type tab, select Bar
and Stacked
(Figure 2).
Figure 2. Type tab for example bar chart
4. On the Data tab, ensure that both Category Axis items and the Data Axis item are selected. Additionally, be sure to select the Uniform Minor Group option (Figure 3). (For the reason why, keep reading.)
Figure 3. Data tab for example bar chart
When a chart has two categories, you must specify whether the possible values for the second category (the minor group) are uniform for each group in the major category.
In this example, the question is this: do work objects have the same resolved status values — Resolved-Approved, Resolved-Completed, and Resolved-Rejected — for each operator in the report? Or do the work objects have different status values for different operators?
In this example, work objects have the same status values for all operators. Therefore, the Uniform Minor Group option is selected.
Figure 4 shows what the result would be if the Uniform Minor Group option were cleared for this report. Compare it to Figure 1. As you can see, the chart displays the work object status values as unique for each operator, which isn't what is wanted for this report.
Figure 4. Uniform Minor Group Option cleared
5. On the Axes tab in the Charts window, specify that the group axis should appear on the left and the data axis should appear on the bottom. Specify that the scale of the group axis is Category (Figure 5).
Figure 5. Axes tab for example bar chart
6. On the Text tab, specify titles for the chart and both axes (Figure 6).
Figure 6. Text tab for example bar chart
7. On the Options tab, select Slide from the Series Effect field, specify that the legend should appear on the bottom, and select the Show Slider option in the Slider section (Figure 7).
Figure 7. Options tab for example bar chart
8. On the Color tab, specify white as the background color. For your report, you are likely to iterate through color selections more than once. Start by accepting the defaults, and then preview the report to see if you like them. If you don't like the results, try various color combinations until you are satisfied. If you select more than one background color, the background color appears as a linear gradient of those colors.
9. Click Apply to save your settings and continue with the Report Wizard forms to preview the chart. Click Back to return to the Chart form if you want to change your settings.
See Also
See also the following articles: