Select to view content in your preferred language

Symbology

764
1
10-21-2024 01:14 PM
JhonatanDavidQuiñonesMamian
New Contributor

Hello to everyone
Please if anyone knows how to display properties like area and area percentage for a symbology. As shown in this figure:image.png

0 Kudos
1 Reply
MErikReedAugusta
MVP Regular Contributor

There are a number of ways to do it, but the simplest is probably using an arcade script instead of a field to drive a "Unique Values" symbology.

Presuming a field "CoverageArea" for the red bits and the standard "Shape_Area" that's automatic for the total area:

return `${$feature.CoverArea}\t(${($feature.CoverArea / $feature.Shape_Area) * 100}%)`

The backticks (`) indicate a string with in-line variables.  The backslash-t (\t) should insert a tab space between the two.  I genuinely can't remember if Symbology-scope Arcade honors it, though.

 

 Quick note: That's going to return every single CoverArea value as a separate symbol.  You'll probably want to bin those with a few if/else statements in the arcade script, but I'm short on time and can't write out the whole thing at the moment.

Let me know if you have trouble with the if/else part, and I'll chime back in with a longer answer.

------------------------------
M Reed
"The pessimist may be right oftener than the optimist, but the optimist has more fun, and neither can stop the march of events anyhow." — Lazarus Long, in Time Enough for Love, by Robert A. Heinlein