How to add a chart to the WorkManager portal
Summary
The standard WorkManager portal uses a gadget named IChartsDashboard to display four interactive charts. By using the <pega:chart> JSP tag, you can configure gadgets that show your reports and add them to your portals.
Suggested Approach
Complete the following steps:
1. Identify which chart you want to display in the portal (that is, which summary view rule with an interactive chart configured). This example uses a pie chart called PolicyDecisions.
2. Create an HTML rule that applies to the Data-Gadget class. For example, NewChartGadget.
3. On the HTML tab, use the <pega:chart> tag to identify the chart. Figure 1 shows JSP code that displays the PolicyDecisions chart.
Figure 1. NewChartGadget, which displays the PolicyDecisions report
Tip: Open the standard gadget named IChartsDashboard, copy the JSP code from that rule into yours, and then modify it.
The JSP from this gadget uses the value of current operator's current work pool — pxRequestor.pxCurrentWorkPool — to identify the applies to class of the report with the className attribute — className= "$SAVE(workpool)". Then, the name attribute identifies the PolicyDecisions summary view rule.
4. Add the gadget to the portal rule. Figure 2 shows the example gadget rule in the Gadget list for the Wide section of the Dashboard in the WorkManager portal rule.
Figure 2. Tabs tab of a portal rule that displays the sample gadget, NewChartGadget
5. To see the results, log in as a user who has the portal you modified to include the new gadget.
Figure 3 shows the new dashboard for the WorkManager portal after the NewChartGadget has been added.
Figure 3. Dashboard of WorkManager portal with the My New Chart Gadget
See Also
See also the following articles: