Select to view content in your preferred language

Legend to work with selector

657
2
09-15-2023 07:32 AM
Labels (1)
Chrystiana_chf
New Contributor

Hello,

I am currently working on a Dashboard, and I am having an issue with the legend showing all of the items inside the map rather than only showing the items from the feature I have selected in the selector. I have the selector set up so that whatever feature is selected that feature is only shown in the map (Render only when filtered). I know when I choose to hide stuff in the map the legend updates, but I want the legend to update automatically when I choose a feature from the selector. Is there a trick that will allow me to set it up this way?

Thanks in advance!

0 Kudos
2 Replies
AdrianWelsh
MVP Honored Contributor

Chrystiana,

That is a great question. I tried messing around with a few things and I could not figure out a way to get my legend to update based on a category selector or selecting items on the map. The closest thing I could do to cheat this system is to make a Table element with my 'legend' items and filter that way. But, that is not a suitable replacement.

Without filter:

AdrianWelsh_0-1694801621259.png


With filter:

AdrianWelsh_1-1694801680033.png

 

In any case, I feel like this would be a great idea to submit to ArcGIS Ideas.

 

ChipMorgan65
Occasional Contributor

   I agree with @AdrianWelsh‘s recommendation.

   I’ve wanted to do this as well, but the product doesn’t yet support it. You’ll want to do a summary table.

   There are some definite benefits of this over an auto-filtering legend. You can show (very basic) stats for each category, such a feature count, sum of a field, distinct count on a text field, etc. You can also set up filters when selecting categories in the table, to filter the map, indicator widgets, other filters, etc. You can also load associated details in a details widget.

   I basically abandoned my need for an auto-filtered legend in favor of the above approach.

   Good luck.

Chip