Select to view content in your preferred language

ValueExpression with VIEW props with UniqueValueRenderer

216
0
02-21-2024 03:58 AM
michaelkdev
New Contributor III

I'm implementing a 'light-dark-toggle" button to choose between these 2 themes. Currently I have 1 uniqueValueRenderer with a attribute FIELD. I was trying to add an attribute to the view object and using this value to check for light / dark mode.

($view.night == 1), 'night', 'day'

But unfortunately it's not possible to add custom attributes to the view and it's not possible to use $view.night with valueExpressions:

https://developers.arcgis.com/arcade/profiles/visualization/#profile-variables


Why is view.scale the only one ?

And how to achieve dark / light without updating all features when toggling to dark or light

 

Thanks

0 Kudos
0 Replies