Please enable JavaScript to view this site.

Version:

Navigation: Configure Controls > Use Charts in Reports

Calculate Summaries in Charts

Prev Top Next More

Chart Designer has predefined summary functions that you can use to calculate the values of the data points. The functions are SUM, MIN, MAX, AVERAGE, and COUNT.

You can only use summary functions with views in which the data points have a single value. You cannot use summary functions when the data points have two or more values, such as in Gantt and Bubble views.

A data point for SUM, MIN, MAX, or AVERAGE can be represented as follows:

data point = (argument1, Function(argument2))

where:

argument1 is specified in the Argument Data Member setting

Function is SUM, MIN, MAX, or AVERAGE

argument2, the field that the function operates on, is specified in Summary Function | Argument

A data point for the COUNT function is:

data point = (argument1, COUNT)

The COUNT function operates on the Argument Data Member field.

The screen capture below shows an example of the configuration for a series that plots the total height of each type of tree in the data set (left). The generated chart is shown at the right.

summary-config-settings

Settings to configure arguments (orange-01-18px) and summary values (orange-02-18px)

summary-orange-arrow

summary-total-tree-height

Chart generated by the configuration at the left

 

To plot the shortest tree of each type, set Function to MIN.

summary-minimum-tree-height

To plot the tallest tree of each type, set Function to MAX.

summary-maximum-tree-height

To plot the average height of each type of tree, set Function to AVERAGE.

summary-average-tree-height

To plot the number of trees of each type, set Function to COUNT.

The Argument setting will be hidden.

summary-number-of-trees

Tutorial - Create a Pie Chart that Uses the COUNT Function

This tutorial shows how to create a pie chart.

The tutorial uses a public ArcGIS feature service called Phone Incidents that maps security incidents reported by phone. The incident field is a coded value domain field. Each code represents a type of incident—Battery, Petty Theft, and so on. The chart uses the COUNT function to count the number of incidents of each type.

In a pie series, each data point is a slice of the pie. Different colors are used to represent the different arguments (incident types). The size of a slice is determined by the data point's value (the number of incidents of that type).

The data used in the tutorial is given in the table below.

Because anyone can edit the feature service used in this tutorial, the data may have changed since the tutorial was written.

Incident data

Domain Code

Domain Description

Number of Incidents

Percentage

0

Battery

2

11.76

1

Petty theft

3

17.65

2

Disturbing the Peace

2

11.76

3

Cardiac Emergency

2

11.76

4

Respiratory Emergency

2

11.76

5

Vehicle Accident

6

35.29

Total

17

99.98 *

*   The missing 0.02% is rounding error.

 

The tutorial is divided into the following steps:

Step 1: Create the report

Step 2: Add the Chart control

Step 3: Open Chart Designer

Step 4: Add a Pie series to the chart

Step 5: Specify the source of the X and Y coordinates

Step 6: Preview the report

Step 1: Create the report

1.Add an ArcGIS data source with the following URL:

https://sampleserver6.arcgisonline.com/arcgis/rest/services/PhoneIncidents/FeatureServer/

To add the data source, click Data Sources in the sidebar, select ArcGIS, enter a name, paste the service's URL into the Service URL box, and click Save.

2.Create a new, blank report.

Click File, click New, and double-click Blank Report.

3.Bind the report to the data source's Dispatch table.

Click Add SQL Data Source add-data-source-to-report, select the data source, and click Next. Expand Tables, select Dispatch, and click Finish.

4.Add a Report Header band.

Select the report and click the Insert Report Header Band icon insert-report-header-band in the Actions section.

Step 2: Add the Chart control

1.Drag a Chart control chart to the Report Header band and adjust the control's size and position.

Placing the chart in the Report Header band makes the chart appear once at the beginning of the report.

summary-add-chart-control

Chart control added to the Report Header band

Step 3: Open Chart Designer

1.Make sure the Chart control is selected and click Run Designer to open Chart Designer.

Step 4: Add a Pie series to the chart

1.In Chart Structure, click Series to show the Add icon add-in-chart-designer.

2.Click the Add icon and select Pie pie-chart from the drop-down list.

summary-select-pie-chart

Pie series

A pie series is added to the chart.

summary-series-added

Pie series added to the chart

Step 5: Specify the source of the X and Y coordinates

1.Make sure the new series is selected in Chart Structure.

2.In the Properties panel, select incident from the Argument Data Member drop-down list.

The Argument Data Member setting specifies the field that the X coordinates will come from (the arguments).

3.Scroll down and expand Summary Function.

4.Set Function to COUNT.

The COUNT function counts the number of records for each type of incident. By default, pie charts express the counted records as percentages of the whole.

When you click away from the Function setting, the chart preview will re-draw. Due to the nature of the sample data used by the chart preview, you will not see a significant change in the preview.

Step 6: Preview the report

1.Click OK to close Chart Designer.

2.Click Preview preview to preview the report.

summary-preview-pie-chart

Report preview showing a pie chart that plots the number of security incidents of different types as percentages

You have successfully created a pie chart.

Enhance the Chart

This section shows a few ways to improve the chart's appearance and utility.

This section has the following steps:

Step 1: Add a title to the legend

Step 2: Show values instead of percentages

Step 3: Show domain codes in the legend

Step 4: Show domain descriptions in the legend

Step 1: Add a title to the legend

1.Re-open Chart Designer.

2.In Chart Structure, select Titles to show the Add icon add-in-chart-designer.

3.Click the Add icon to show the drop-down list of title positions relative to the chart.

4.Select top right chart-title-top-right.

A title is added to the chart. The new title appears in Chart Structure, the preview, and the Properties panel.

summary-add-legend-title

Chart preview showing the legend's default title at the center right

You can change the title's position using the Dock and Alignment settings.

5.Make sure the title is selected in Chart Structure.

6.In the Properties panel, type Key in the Text box.

7.Click away from the Text box to update the chart preview.

summary-change-legend-title

Chart preview, showing the updated title for the legend

Step 2: Show values instead of percentages

In this step, you will change the labels on the pie slices and in the legend from percentages to values. Because the summary function is COUNT, the value of a data point is the number of records for that argument.

1.In Chart Structure, select the chart's series.

2.Scroll down the Properties panel and expand Label.

3.Type {V} in Text Pattern.

The {V} text pattern shows the value of data points.

Changing the text pattern for the series also changes the pattern for the legend. Later, you will customize the legend's labels.

You can use literals in the text pattern. For example, in the pattern {V} incidents, the word "incidents" is a literal that will appear in the report output. For example, if the value is 2, the label will be "2 incidents".

4.Click away from the Text Pattern box to update the chart preview.

The chart preview's sample data may not appear realistic. For example, in the generated report, the number of incidents will always be a whole number.

summary-use-values-in-chart

Chart preview, showing values instead of percentages in the labels

5.Click OK to close Chart Designer.

6.Click Preview preview to preview the report.

Previewing the report shows the actual data.

summary-use-values-report-preview

Report preview, showing values instead of percentages in the series and legend labels

Step 3: Show domain codes in the legend

When a series' Argument Data Member setting is a coded value domain field, the arguments are codes. In this tutorial, the arguments are integers from 0 to 5, each of which represents a type of security incident—Battery, Petty Theft, and so on.

The {A} text pattern allows you to show arguments in a chart's labels. In this step, you will use the {A} pattern to show the codes in the legend's labels, while leaving the series' labels to show values. To do this, you configure the series' Legend Text Pattern setting, which affects the legend's labels only, not the series labels.

1.Re-open Chart Designer.

2.In Chart Structure, select the series.

3.Set Legend Text Pattern to {A}.

The {A} text pattern shows the data points' arguments.

summary-use-domain-codes

Chart preview, showing domain codes in the legend

4.Close Chart Designer and click Preview preview to preview the report.

summary-use-domain-codes-report-preview

Report preview showing domain codes in the legend

Step 4: Show domain descriptions in the legend

In the chart, the incident types are represented by different colors. To interpret the chart, the user needs to know what the colors represent. To provide this information, you will change the legend's labels to show the domain descriptions.

summary-codes-vs-descriptions

Legend with codes (orange-01-18px) and with descriptions (orange-02-18px)

To show domain descriptions, you will add a calculated field to the table. A calculated field is a field whose value is calculated by an expression that you define in the configuration. In this case, you will configure the calculated field to use the GetDomainDescription() function, which will set the calculated field to the domain description. Then, instead of using the original coded value domain field (incident) as the Argument Data Member, you will use the calculated field.

The series' Legend Text Pattern setting must be set to {A}, as shown in Step 3: Show domain codes in the legend.

1.In Report Designer, open the Field List field-list-14.

2.Expand the data source.

3.Click the Dispatch table to show the management buttons.

4.Click Add Calculated Field add-calculated-field-18x18.

summary-add-calculated-field

Add a calculated field to the Dispatch table

A calculated field is added.

summary-calculated-field-added

Calculated field added to the Dispatch table

5.Click Edit edit-18x18 to edit the calculated field.

summary-re-edit-calculated-field

Edit the calculated field

The calculated field expands to show its settings.

summary-calculated-field-settings

Calculated field and its settings

6.Configure an expression that gets the domain descriptions:

a.Click the ellipsis icon in the Expression box to open the Expression Editor.

b.Expand Functions | GIS in the bottom left pane (orange-01-18px).

c.Double-click GetDomainDescription([@Feature, '') (orange-02-18px) to add the function to the expression (orange-03-18px).

In order to get domain descriptions, the query must return @Feature. See Modify a Query to Return Different Fields for instructions on viewing and changing the fields that the query returns.

summary-configure-domain-expression

Add the function that will get the domain description

d.In the expression, change fieldname to incident.

The final expression should look like this:

summary-domain-expression

Expression to get domain descriptions from the incident field

e.Click OK to close the Expression Editor.

7.Verify your configuration for the calculated field by comparing it to the screen capture:

summary-calculated-field-config

Final configuration for the calculated field

8.Open Chart Designer.

9.In Chart Structure, select the series.

10.In the Properties panel, select the calculated field from the Argument Data Member drop-down list.

This replaces the incident field.

summary-select-calculated-field

Use the calculated field as the series' Argument Data Member

11.Click OK to close Chart Designer.

12.Click Preview preview to preview the report.

summary-use-domain-descriptions-report-preview

Report preview showing coded value domain descriptions in the legend

© 2026 VertiGIS North America Ltd. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 5.24 (7ce4efa4)