Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to create an interactive pie chart

Updated on September 20, 2019

Summary

Before you begin, read Preparing to create and use interactive charts.

The application used for the example in this article generates quotes for car insurance policies. A rating is calculated based on information about the applicant's driving history and other information. The value of the rating is programmatically used to determine whether the application for insurance is eligible, not eligible, or needs a review by an underwriter. Figure 1 is an example of a simple pie chart that shows how many potential policies fall into each category: Eligible, Not Eligible, and Needs Review.

zzz

Figure 1. Example pie chart: Collision Policies by Policy Decision


 

 

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 work objects whose Policy Decision field is not null as the report criteria, grouped the data by Policy Decision, and configured a simple count for 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, on the Type tab, select Pie and Normal (Figure 2).

zzz

Figure 2. Type tab for example pie chart

4.     On the Data tab, leave the defaults for Field and Name Field. Because there are only three values that appear in the example pie — Eligible, Not Eligible, and Requires Review - the default of No Limit in the Limit to Top field was also left unchanged Figure 3).

zzz

Figure 3. Data tab for example pie chart

For your report, if more than a manageable number of slices appear in the pie chart, use the Limit to Top field to specify how many slices to include. For example, if you specify 3, the pie has four slices: a slice for each of the three categories with the highest number of records and a piece that represents all the rest.

5.     On the Text tab, enter a title for the pie chart (Figure 4).

zzz

Figure 4. Text tab for example pie chart

6.      On the Options tab, do the following, as shown in Figure 5:

  • Put the legend on the bottom of the chart using horizontal as the direction.
  • elect all the options in the Label section, and
  • Select Callout as the Label Position.

zzz

Figure 5. Options tab for example pie chart

7.      On the Color tab, in the Background Color section, click the Color button and select white (Figure 6). The default background color is a light blue so if you do nothing, your chart will have a blue background.

8.      In the Foreground Color section, specify three colors because there are three slices in the pie (Figure 6). The first color (green) is used for the top item, sorted by the name field column. In this case, the colors are applied to the items shown in alphabetical order: green for Eligible, blue for Not Eligible, and pink for Requires Review.

zzz

Figure 6. Color tab for example pie chart

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, 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.

How to Configure Conditional Foreground Color

The example pie chart shown in Figure 1 does not use the Conditional Foreground Color option. You use this option to specify a color for a specific slice no matter how it would normally sort. For example, say that the pie chart shows work object status and you want the slice that represents Resolved-Rejected work objects to always be purple, no matter how the slices in the pie are sorted.

In such a case, in the Conditional Foreground Color section, configure the condition that Work Status is equal to Resolved-Rejected and specify the color as purple (Figure 7).

zzz

Figure 7. Example of Conditional Foreground Color

Figure 8 shows the resulting pie chart. Notice that the Resolved-Rejected slice is purple.

zzz

Figure 8. Chart with Conditional Foreground Color specified

See Also

See also the following articles:

Tags

Pega Platform 7.1.1 - 7.4 Reporting Financial Services Healthcare and Life Sciences Insurance Communications and Media Government Healthcare and Life Sciences Consumer Services Consumer Services Manufacturing Consumer Services

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us