Select to view content in your preferred language

Trying to create/format a symbol so that 2 attributes are displayed as differing colors on a single symbol

452
10
Jump to solution
01-16-2025 05:20 AM
Labels (1)
Brett_Adie
Emerging Contributor

Good day

I am looking to display 2 different attributes on a single symbol. Ideally, I am looking to use a split symbol (e.g. circle 6) where one attribute value is displayed in one color on one side of the symbol, and the other attribute is displayed as a different color on the other side of the symbol. 

 

Could someone suggest a way that i can do this

 

regards

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
AlfredBaldenweck
MVP Regular Contributor

Try allowing symbol property connections (Attribute driven symbology) .

For example

AlfredBaldenweck_0-1737050021633.png

AlfredBaldenweck_1-1737050032922.png

To get this, I set it to use Symbol Property Connections

AlfredBaldenweck_2-1737050087836.png

Then, for each symbol layer, I set the color property to be a given field in my table. (Note the blue database symbol-- that means that property is connected to an attribute)

AlfredBaldenweck_4-1737050191013.png

AlfredBaldenweck_3-1737050175856.png

In your case, you'd probably want to use an actual arcade expression so you can match colors to certain values, like

if ($feature.column1 == "School"){
    return "#00ffff"
}else{
    return "000000"
}

 

I use this sort of thing (not for color, but I wish I had-- that'd've been easier by a lot) pretty frequently, e.g. setting labels or drawing the radius of a circle dynamically as part of the symbol. Huge shoutout to @JohannesLindner for figuring that out for me.

View solution in original post

10 Replies
Eugene_Adkins
Frequent Contributor

Unless someone else can provide a more straightforward process, I think this solution (though it applies to lines) could be adapted to points and get you started.

Here's some documentation from tech support that will point to this solution. It essentially references the solution from the above community post.

0 Kudos
ZachBodenner
MVP Regular Contributor

Here's a solution I used for our Lead Service Line inventory. It uses an Arcade code snippet to identify two different attributes as variables and then create symbol classes for the different combinations. You could do something similar and change the resulting "when categories" to meet your needs.

var sm = $feature.SysMaterial
var cm = $feature.CustMaterial

when (
cm == 'Unknown' && sm == 'Unknown', 'Both Unknown',
cm == 'Unknown' && sm != 'Unknown', 'Customer Unknown',
cm != 'Unknown' && sm == 'Unknown', 'System Unknown',
cm == 'Lead', 'Lead',
sm == 'Lead', 'Lead',
'Non-Lead')

 

ZachBodenner_0-1737036898875.png

 

Happy mapping,
- Zach
AlfredBaldenweck
MVP Regular Contributor

Try allowing symbol property connections (Attribute driven symbology) .

For example

AlfredBaldenweck_0-1737050021633.png

AlfredBaldenweck_1-1737050032922.png

To get this, I set it to use Symbol Property Connections

AlfredBaldenweck_2-1737050087836.png

Then, for each symbol layer, I set the color property to be a given field in my table. (Note the blue database symbol-- that means that property is connected to an attribute)

AlfredBaldenweck_4-1737050191013.png

AlfredBaldenweck_3-1737050175856.png

In your case, you'd probably want to use an actual arcade expression so you can match colors to certain values, like

if ($feature.column1 == "School"){
    return "#00ffff"
}else{
    return "000000"
}

 

I use this sort of thing (not for color, but I wish I had-- that'd've been easier by a lot) pretty frequently, e.g. setting labels or drawing the radius of a circle dynamically as part of the symbol. Huge shoutout to @JohannesLindner for figuring that out for me.

Brett_Adie
Emerging Contributor

Hi

 

Thanks for the assist..just a quick follow on. I made the change but my legend doesnt reflect the change in colors. How do i update the legend?

 

regards

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

Ugh. I haven't found a good way, tbh. Best workaround I can think of is to either 

1) Make two layers with the unique values and have those appear in your legend while hiding the main one

AlfredBaldenweck_0-1737470562638.png

Tip: Save the individual parts of the symbol you want to a style so you can format all symbols in the layer.

AlfredBaldenweck_1-1737470683277.png

Or:

2) Manually make your legend using graphics symbols

AlfredBaldenweck_2-1737470726732.png

This seems kind of similar to a dictionary symbol? When I made this, the presence of each symbol meant that that amenity was there, and in the case of Water, it had three options: Not there, There and Potable, and There and Non-potable. 

 

In this case, I think the first solution is probably better, although neither is great.

0 Kudos
Brett_Adie
Emerging Contributor

Thanks again, i think i will go with option 1 with the legend, makes things a bit more complicated but still looks like the best option

0 Kudos
KerryRobinson
Esri Contributor

Because currently there is no legend support for layers using the Dictionary Renderer, I have seen other examples of customers doing this (option 1 - create another layer with a unique value renderer of specifically the symbols you want in your legend) which have turned out pretty well. 

This is a public example from the National Park Service in Yosemite. They used this web map in a dashboard. You can see the `HydroMet Stations` group layer has two layers in it... one is `HydroMet Stations` (which is the real data used with the Dictionary Renderer) and the other is `Data Status` which is an empty layer with symbology set up in a nice way specifically for the legend. I think this turned out nicely in the app and actually gave them a more specific way to show these multi-attribute status symbols without having to show every permutation as a separate symbol in the legend. 

Web map: 

KerryRobinson_0-1738273209324.png

 

App (link) :

KerryRobinson_1-1738273289337.png

Kerry

 

 

KerryRobinson
Esri Contributor

Hi-  another option is to use the Dictionary Renderer. A blog post was actually just published discussing how to use the Dictionary Renderer for status symbols driven by multiple attributes. It shows how to use 3+ attributes and provides a style with some examples on how to support up to 7 attributes... so you would need to update that style to instead use a circle divided in 2 parts.   This is a handy example web application to demonstrate how the symbols update as you change the attribute values. 
At the end of the blog, there are links to several other blogs and resources describing how to create/customize dictionary styles. 
If you're interested in going down this road, and need any additional help/guidance, let me know! 

0 Kudos
Brett_Adie
Emerging Contributor

Hi

I just wanted to thank you for your reply, while your solution wasnt quite what i had in mind for this request i do believe that it will be useful for me in the near future.

Thanks again