HOW TO

Anzeigen eines Countdowns im Indikatorelement in ArcGIS Dashboards unter Verwendung von Arcade

Last Published: April 26, 2024

Zusammenfassung

In ArcGIS Dashboards, dashboard elements can be configured to display information in an easy-to-read format. This article provides the workflow to display a countdown in the Indicator element using an Arcade expression.

Vorgehensweise

  1. In ArcGIS Dashboards, in Layout, on the Body tab, click Add element, and select Indicator.
Add an Indicator element to a dashboard by navigating to the Body tab, click 'Add element', and select Indicator in the drop-down list. The Indicator element option is symbolized with a 99! icon.
  1. Select a layer from the map added to the dashboard.
  2. On the Indicator page, select the Indicator tab.
  3. Under Indicator options, for Advanced formatting, click Enable.
To edit the Arcade expression for the Indicator element, navigate to the Indicator tab, and under Indicator options, click Enable on the right to enable 'Advanced formatting'.
  1. On the Expression tab, highlight and delete the existing expression in the box.
  2. Copy and paste the following Arcade expression into the box. For the Date function in endDate, replace the year, month, and day with the desired values.
var startDate = Today();
var endDate = Date(year,month,day);
var daysLeft = DateDiff(endDate, startDate,'day');

return {
middleText: daysLeft,
middleTextMaxSize: 'large',
bottomText: 'Days left!',
}
Note:
In the Date function, months are defined by 0-11 where 0 is January and 11 is December. For example, to indicate May, type '4' as the month in the Date function.
  1. The Indicator preview displays the countdown. In this example, the startDate is today, March 10, 2022, and the endDate is '2022,4,30' (May 30, 2022).
The Indicator element preview displays the text, '81 Days left!' based on the Arcade expression. The startDate is set to 'Today', and the endDate is set to '2022,4,30' which stands for May 30, 2022.
  1. Click Done. The Indicator element is configured to display a countdown in the dashboard.

Artikel-ID: 000027014

Benachrichtigungen erhalten und Lösungen für neue oder häufige Probleme finden

Unser neuer KI-Chatbot stellt zusammengefasste Antworten und Videolösungen für Sie bereit.

Esri Support App herunterladen

Zugehörige Informationen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln