Thousands Separator

771
4
Jump to solution
11-01-2023 02:41 PM
Labels (3)
EricG
by
New Contributor III

(ArcGIS Online)

Was hoping there was a 'check button' similar to that of the ArcGIS Pop-Up that would display a thousands separator on the actual label within ArcGIS Online.

Is the resolution -- to check the thousands separator in the 'numeric' shuffle menu and share the webfile over an existing file (that has the same data)? Or am I missing something here? in the ArcGIS Online 'label' functionality?

My thanks to all of you in advance,

- Eric (Chuck) Gurney

Rhode Island Department of Health (RIDOH)
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You can use an Arcade expression to add the thousand separator and your additional text. This example uses the Text function and template literals.

`Approximately ${Text($feature["RECORD_AREA_SF"], "#,###")}`

label.png

This is what the original looked like. Note that the field already has the thousands separator turned on, which isn't reflected in the unformatted label.

label1.png

 

View solution in original post

4 Replies
Teresa_Blader
Occasional Contributor III

You are correct that the thousands separator button in the "Fields" menu (what you call the 'numeric' shuffle menu I think) applies to both the pop-up and the labels. You can also apply this to the layer on the item page in ArcGIS Online on the "Visualization" tab (if you own it) - and then the layer will use those settings by default whenever the web layer is brought into the map. If you do not turn on the thousands separator for that field on the layer using the Visualization tab, you will have to turn it on any time the layer is brought into the map. Alternatively, you could duplicate the layer once in a map, after toggling the thousands separator on, and then the duplicate layer would have that setting too.

Now, I'm not so sure what you mean by "share the webfile over an existing file (that has the same data)", so I'll take a guess: 

Labels do disappear in AGOL if an overlapping layer has labels too, especially if they are the same. So if you mean that you have an identical layer with "labels on" directly over it, you are likely seeing those others labels and not the labels underneath. Sometimes labels in AGOL have a hard time displaying if there is a layer without labels, completely overlapping it AGOL's map viewer labeler is very very minimal in functionality. Best to use visibility scales on the labels settings and set them to specific zoom levels if you want to control when and how those appear. 

Your best friend is setting visibility scales for both the map layers and the labels.

Teresa Blader
Olmsted County GIS Specialist
EricG
by
New Contributor III

Thanks for the insight to this Teresa. I will turn on the thousands separator for that field on the layer using the visualization tab.  

 

When I mentioned, 'share the webfile' over an existing file I was referring to changing the numeric item by checking the thousands separator, and resaving (uploading into ArcGIS Online) the data by the method in the image attached. That way the pop-ups remain un altered, but the data displays 1000 on the map as 1,000.

A quick aside (not a debilitating question - so please don't waste time if you're not aware) -- Is there any way in arcade to place a prefix or suffix onto that field value.

example: 1,000 'persons w/o health insurance' -or- 'approximately' 1,000 ...

Thanks for your reply. I'll get to work on this Thursday!

- Chuck

 

Rhode Island Department of Health (RIDOH)
0 Kudos
KenBuja
MVP Esteemed Contributor

You can use an Arcade expression to add the thousand separator and your additional text. This example uses the Text function and template literals.

`Approximately ${Text($feature["RECORD_AREA_SF"], "#,###")}`

label.png

This is what the original looked like. Note that the field already has the thousands separator turned on, which isn't reflected in the unformatted label.

label1.png

 

EricG
by
New Contributor III

Ahhhh !!  Very nice. Thank you! Have a great day!  - Chuck

Rhode Island Department of Health (RIDOH)
0 Kudos