I want to show items and labels in the legend only for those features shown on map. I hid some of them with a query definition in layer properties, but they're still visible in the legend. I know that converting the legend to graphic I can manage manually each item, thus delete those I don't want, but I would like to put only the correct items automatically in order to have them disposed in a specific number of columns without needing to move the items one by one. I didn't find any way in legend properties to exclude those items. Any idea?
-
The suggestion from @Dan_h_b is a good one - just one trap: make sure the relevant layer(s) in the left-hand pane in the items tab is selected. The "Only show classes that are visible in the current map extent" is only applied to those layer(s) selected. You can select one or many, but if the relevant layer is not selected it will not be reflected on the map.– cosiDec 12, 2017 at 5:12
2 Answers
There is an even simpler way to do this, especially if you have a lot of layers in your map, as your method would be a bit time consuming.
In the Layout View, right click on your Legend and select "Properties". Go to the "Items" tab and tick the box "Only show classes that are visible in the current map extent" found in the "Map Extent Options" section.
-
I tried that but it didn't work. I would have expected the right result as you say, but - don't know why - it eliminated from the legend the wrong items Sep 2, 2015 at 8:50
-
Forget what I said. The definition query to esclude those classes was cleared. The strange thing is I didn't notice that because those classes didn't show anyway in the map. Might be because of the data frame clip to shape I did, though I'm not sure that would clip also features. I guess it does. Sep 2, 2015 at 9:14
I'm going to answer my own post because I found a solution and realized it was a very easy one. I just needed to clear those items from the symbology properties of the layer and they also disappeared from the legend.