HOW TO

Farbcodierung des Hintergrunds des Listenelements mit Arcade-Ausdrücken in ArcGIS Dashboards

Last Published: April 26, 2024

Zusammenfassung

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.

Vorgehensweise

  1. Open the ArcGIS Dashboards item. Click Layout on the dashboard toolbar, then the Options button Horizontal three dot icon next to the element. Click Configure.
The dashboard toolbar with the Layout 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

Artikel-ID:000027436

Hilfe von ArcGIS-Expert*innen erhalten

Technischen Support kontaktieren

Die Esri Support-App herunterladen

Zu den Download-Optionen

Zugehörige Informationen

Weitere Informationen zu diesem Thema erkunden