English
Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

How To: Create a list, pie chart, and serial chart with only distinct features from a table in ArcGIS Dashboards

Summary

In ArcGIS Dashboards, Arcade expressions can be used to customize how the data points render for the list, and pie chart elements. Depending on how the element is configured, a data point can represent a feature or a summary statistic.

This article provides the steps to generate distinct features from a table and display them in a list, pie chart, and serial chart for better clarity. The image below displays a list and a pie chart of incidents by condition.

The ArcGIS Dashboard with the general table on the top left, the summarized list on the top right, the pie chart on the bottom left, and the serial chart on the bottom right of the dashboard

Procedure

  1. Open the ArcGIS Dashboards item. Click Add element on the dashboard toolbar and place an element in the dashboard.
The location of the Add element button in the dashboard toolbar and the dashboard
  1. Select List for creating a new list, Pie chart for creating a new pie chart, or Serial chart for creating a new serial chart, and click New data expression.
The location of the New data expression button in the Select a layer window
  1. Specify the following Arcade expression in the Expression window.
    • Arcade expression for the list element:
var portal = Portal('<portal_URL>');
var <variableName1> = '<itemID>';
var <variableName2> = FeatureSetByPortalItem(
    portal, <variableName1>, <sublayer_ID>, ['<field_name_1>', '<field_name_2>', ..., '<field_name_n>'], false);

return distinct(<variableName3>, '<field_name_n>')
  • Arcade expression for the pie chart, and serial chart element:
var portal = Portal('<portal_URL>');
var <variableName1> = '<itemID>';
var <variableName2> = FeatureSetByPortalItem(
    portal, <variableName1>, <sublayer_ID>, ['<field_name_1>', '<field_name_2>', ..., '<field_name_n>'], false)

var <variableName4> = GroupBy(<variableName3>, distinct(['<field_name_n>']), [{
    name: '<field_name_new>',
    expression: '<field_name_n>',
    statistic: '<statistic type>'
}])

return <variableName4>
Note:
Specifying the fields and includeGeometry parameters in the FeatureSet are optional expressions for the FeatureSetByPortalItem() function. Refer to ArcGIS Arcade: FeatureSetByPortalItem for more information.
  1. Click Test and review the results below the Expression window.
  2. Specify a name for the expression and click Done.
Specifying the Arcade expression in the Expression dialog box, reviewing the sample of the expression's test results, and giving the expression a name for future reference
  1. Generate and format the list or pie chart as required. Refer to ArcGIS Dashboards: List, ArcGIS Dashboards: Pie chart, or ArcGIS Dashboards: Serial chart for more information. Click Done.

Related Information

Last Published: 6/21/2022

Article ID: 000027717

Software: ArcGIS Dashboards 9.4, 9.3, 9.2, 9.1, 10.2, 10.1 ArcGIS Online Current