Select to view content in your preferred language

Web Apps Ungroup Legend Symbology

1382
5
Jump to solution
05-11-2023 09:51 AM
Labels (2)
ZachBodenner
MVP Regular Contributor

Hello,

I have been quietly living with a problem for many years and I'm finally sick of dealing with it. In my publishing document (Arc pro 3.1.1 in this case but it's happened in many versions of both Map and Pro), I take all the time to group together features by symbology to make them easier for end users/the public to interpret in the legend (GroupedInSymbology.jpg). When I add my published features service to a web map via REST endpoint, the legend looks as it should (GroupedInWebMap.jpg). But whenever grouped symbology layers like this are consumed in a web app (In this case Experience Builder 11.1 dev edition, but again I've had the same problem in ExB 1.7, 1.9, and various versions of Web AppBuilder), the software maintains the legend symbology but ungroups the values. The resulting list is very confusing because it does maintain the appropriate label, except each value gets the same label, so there are multiple entries of a particular label, all with the same symbol (UngroupedInWebApp.jpg).

As I said this has stumped me for a long time. Does anyone have any idea why this happens or if anything can be done?

1 Solution

Accepted Solutions
ZachBodenner
MVP Regular Contributor

Hi, thanks for responding, though this has actually been logged as a BUG by ESRI (BUG-000151332). My my-esri page shows it as non-reproducible, which is obviously correct as there are a number of other community threads with people experiencing the same issue.

https://community.esri.com/t5/arcgis-online-questions/combine-legend-items-in-arcgis-online/m-p/1312...

This thread in particular has a great work around utilizing the decode function in Arcade. Grouping layers for symbology is such a necessary part of map creation that it's a little annoying that a work around is even necessary, but understanding that bugs happen, this particular function is pretty dang effective. If any other users stumble across this thread, use the Decode to get what you're looking for.

View solution in original post

5 Replies
Shen_Zhang
Esri Contributor

Hi @ZachBodenner 

Could you provide a sample data to repro this issue? Will definitely help to identify the cause of the problem, thanks!

Shen Zhang
0 Kudos
ZachBodenner
MVP Regular Contributor

Sure, here is a layer where I've experience this. This is the layer in the examples above if you want to use the same grouping methodology. Upon further troubleshooting, it does seem like this might be Experience Builder specific. I could have sword I'd experienced this behavior in WAB as well, but I tried to reproduce it with an ESRI Rep yesterday and could only reproduce with ExB.

0 Kudos
Shen_Zhang
Esri Contributor

@ZachBodenner Thanks for the data provided. I published a feature service with data you provided, seems same problem also existed in Map Viewer:

Screenshot 2023-05-24 at 16.00.03.png

I tried to add this layer to Map Viewer Classic, it turns out working fine - were you using Map Viewer Classic in the screenshot which legend looks as it should? 

Screenshot 2023-05-24 at 16.03.01.png

It could be Javascript api bug - since Map Viewer and Experience builder are both using the latest version of JS API.

Shen Zhang
0 Kudos
TonghuiMing
Esri Regular Contributor

Hi @ZachBodenner 

Sorry that you have been experiencing this issue. Per the detailed investigation from us and the JS API team, the problem lies in ArcGIS Pro - when you add the published data back to Pro, it also has the same issue.

We will notify the corresponding team about this and they will help fix it. In the meantime, you can post the question on the ArcGIS Pro Community channel if you'd like.

 

Thanks for bringing this up.

 

Tonghui

0 Kudos
ZachBodenner
MVP Regular Contributor

Hi, thanks for responding, though this has actually been logged as a BUG by ESRI (BUG-000151332). My my-esri page shows it as non-reproducible, which is obviously correct as there are a number of other community threads with people experiencing the same issue.

https://community.esri.com/t5/arcgis-online-questions/combine-legend-items-in-arcgis-online/m-p/1312...

This thread in particular has a great work around utilizing the decode function in Arcade. Grouping layers for symbology is such a necessary part of map creation that it's a little annoying that a work around is even necessary, but understanding that bugs happen, this particular function is pretty dang effective. If any other users stumble across this thread, use the Decode to get what you're looking for.