PROBLEM

The number of decimal places is not reflected in the label in ArcGIS Online Map Viewer

Last Published: July 4, 2024

Description

When labeling a layer in ArcGIS Online Map Viewer, the specified number of decimal places for a number field is not accurately reflected in the labels. Instead, the labels display precise numbers, disregarding the configured decimal places. This compromises the intended precision and consistency in the map presentation.

In the map below, although the GiZScore field is configured to two decimal places, the labels display all the decimal places from the original data.

The configured number of decimal places in the pop-up and the label displaying the full precision.

Cause

The configuration for the number of decimal places applies only to the fields. The field formatting settings, which affect pop-ups and the attribute table of the layer, do not extend to labeling in ArcGIS Online Map Viewer. The labels are configured independently; therefore, the specified number of decimal places configured in the field formatting is not reflected in the labels.

Solution or Workaround

Follow the steps below to configure the number of decimal places in the feature layer label in ArcGIS Online Map Viewer.

  1. Open the web map in ArcGIS Online Map Viewer.
  2. On the Settings (light) toolbar, click Labels The Labels icon..
  3. In the Label features pane, expand the label class, and under Label field, click Use expression The Use expression icon..
  4. In the expression editor window, delete the existing expression and specify the following Arcade expression. The Round function is used to round the number to a given number of decimals.
Round($feature.<field name>,<decimal places number>)
The expression in the editor window.
  1. Click Done and save the map.

In ArcGIS Online Map Viewer, the label is displayed with the configured number of decimal places, as demonstrated below.

The configured number of decimal places in the label.

Article ID: 000032890

Software:
  • ArcGIS Online

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

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options