Select to view content in your preferred language

Allow formatting AGOL legends with percent %

601
3
10-31-2023 02:36 PM
Status: Open
kate_sightline
New Contributor II

In ArcGIS Online, allow additional number formatting options for fields, specifically the ability to format a decimal as a percentage (%) for display in legend and elsewhere. 

I can create an Attribute Expression, which allows for displaying a decimal as a % for pop-ups, but this converts the field to string and does not provide a solution for choropleth mapping/legends. 

Here I have a numeric field (turnout bonus) with percentages stored as decimal values. I want the legend to display >100% - 128%, 75% - 100%, etc. This is basic functionality 

kate_sightline_0-1698787882896.png

The most logical place would be to add an option to the Formatting options to allow display as % (multiply by 100, add "%")

kate_sightline_1-1698787894100.png


Alternatively, you could allow for custom editing of the legend. (Basically, the ability to click into the pre-set defaults and write my own text) 

 

3 Comments
JayLarsen

Yeah, it would be nice!  Especially since % is so common in mapping.

My recollection is you have to format the number part and the label part both with 2 separate Arcade expressions to handle both labelling in the choropleth map and the legend.  Very annoying.

Maybe somebody knows some magic to handle this?

EBrayshaw

This would be so useful!

Sage_Wall

Hi @kate_sightline , we have an internal issue to implement being able to use arcade expressions in the Legend.  At the moment however, unless I misunderstood the question, I think you can do what you want to in the AGOL interface.  If you go to the style options for the layer in question you should be able to click on and modify any of the class labels.

Screenshot 2024-02-05 043442.png