HOW TO

Color code the background of the List element using Arcade in ArcGIS Dashboards

Last Published: April 26, 2024

Summary

Arcade expressions can be used in ArcGIS Dashboards to customize how the data points appear in the list, indicator, and table elements. A data point can represent a feature or a summary statistic, depending on how the element is set up. A single data point represents a single feature when using features, and each data point represents the result of a statistic when it is used.

This article provides the steps to color code the background of the List element in ArcGIS Dashboards. In this example, the field values in the Project Status field are referenced to determine the background color for each field value in the Route Name field.

Procedure

  1. In the item details page, click Edit Dashboard to
    configure the dashboard. Click View on the dashboard toolbar, then the Options button Horizontal three dot icon next to the element. Click Configure.
The dashboard toolbar with the View tab
  1. Click List to open the List options menu, and click Enable.
Enabling the advanced formatting of the List element in ArcGIS Dashboards
  1. Specify the following Arcade expression in the Expression window.
// Edit the desired color accordingly
var <variableName> = Decode($datapoint["<variable>"],
'<Field value 1>', 'red',
'<Field value 2>', 'orange',
'<Field value 3>', 'yellow',
'<Field value 4>', 'green',
'')

return {
  backgroundColor: <variableName>
}
  1. Click Done.
Specifying the Arcade expression in the ArcGIS Dashboards Expression window

The image below shows the list element without the Arcade expression.

An example of the List element without the Arcade expression enabled

The image below shows the list element with the Arcade expression.

An example of the List element with the Arcade expression enabled

Article ID: 000027436

Software:
  • ArcGIS Online
  • ArcGIS Dashboards

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options