Expand Widget with LayerList with Legend with Class Breaks Renderer (Graduated Colors) Feature Layer

675
2
07-06-2022 09:30 AM
Jeff-Reinhart
New Contributor III

When using the Expand widget to display a LayerList that contains a Legend for a Feature Layer that references a Map Service created using Graduated Colors (and resulting in a Renderer with Class Breaks Renderer), I cannot get the symbols to show up in the Legend. Here is the REST URL.


You can see this behavior in this example. If you click the Legend button for the row in the LayerList, it will show the symbols. If you click the Expand widget button, then click the Legend button for that row, the symbols do not show.


On inspection, the <div class="esri-legend__symbol"> has children on the non-Expand LayerList. The Expand version does not have children, the div is empty.


I know I could build my own button as is done in this example.


Am I missing something or is the Expand widget just broken here?


Is there a better workaround? 

0 Kudos
2 Replies
KristianEkenes
Esri Regular Contributor

It looks like a bug. We'll take a look at fixing this in our next release. Thanks for pointing it out.

Jeff-Reinhart
New Contributor III

Thanks, @KristianEkenes. This issue may not be isolated to just services with a Class Breaks Renderer. I had the same issue yesterday with a FeatureLayer that had a SimpleRenderer applied.

0 Kudos