操作方法
When editing labels with numeric data to two decimal places using the Round() function in an Arcade expression, the trailing zeros after the decimal point are not retained. It is sometimes necessary to retain the zeros after the decimal point in a label to ensure data accuracy and consistency.
In this article, the length of the highways must be rounded to two decimal places; however, the zeros after the decimal point are not displayed. For example, 0.50 is displayed as 0.5, and 1.00 is displayed as 1, as shown in the following image.
The workflow to retain the trailing zeros after a decimal point in labels using the Text() function in an Arcade expression in ArcGIS Pro is provided below.
To retain trailing zeros after a decimal point, use the Text() function.
Note: Refer to ArcGIS Arcade: Text for more information.
Text($feature.fieldname, '#,###.00')
The image below shows the trailing zeros are retained in the labels.
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序