Arcade expression for vary symbology by color

2030
2
07-07-2020 09:52 AM
JohnMorgan
Occasional Contributor

Hello, 

I am attempting to control the color of my graduated symbols based on a different value from the one used to drive the symbol sizes. Both values are in the same attribute table. I was thinking to do this with an Arcade expression under "Vary symbology by color" however, it doesn't seem to be working as expected. The Arcade expression I am using is:

if ($feature.USER_avg_tem==70){
return rgb(255, 255, 0)
}

Any advice on how to get this working would be appreciated. 

Thanks, 

Derek

2 Replies
LucaTroncarelli
New Contributor

I have the same problem. I tried with rgb values (with comma and without commas), with the HEX value but nothing. With size and trasparency expressions there are no problems.

Only for assign colours with Arcade expressions

0 Kudos
JohannesLindner
MVP Frequent Contributor

I'm pretty late to the party, but maybe it still helps...

You have to return a string.

return "rgb(255, 255, 0)"
return "rgba(255, 255, 0, 0.5)"
return "red"

 

The documentation is here:
https://pro.arcgis.com/de/pro-app/latest/help/mapping/layer-properties/attribute-driven-color-in-sym...

 


Have a great day!
Johannes