Author Name: Carolyn Krause (Carolyn Krause)
Original Redmine Issue: 21994
Affected QGIS version: 3.6.1
Redmine category:map_composer/printing
In the print layout, a legend has the option to display a "feature count" for a layer. This option displays the total number of features in that layer, as expected. However, the option, "filter legend by map content," has no effect on the "feature count." I would expect the "filter legend by map content" option to reduce the "feature count" to _count only the features within the map extent_.
For example, if a layer has 10 features, but only 5 are visible on the map. I would expect "feature count" to display [10] when "filter legend by map content" is off. I would expect the "feature count" to change to [5] when "filter legend by map content" is turned on.
I'm posting this as a bug report because I think the feature doesn't work as would be reasonably expected. If others disagree, please make this a feature request instead. It would be very useful to automatically display a count of features visible on the map.
There are screenshots of this issue on GIS Stackexchange: https://gis.stackexchange.com/questions/321578/how-to-show-feature-count-for-layout-extent
Author Name: Brett Carlock (@Saijin-Naib)
I agree with your assessment of expected behavior vs actual.
The layers are filtered the count is distinct. Though this should be feasible if my works get merged. In the meantime this is working as intended and not a bug.
The layers are filtered the count is distinct. Though this should be feasible if my works get merged. In the meantime this is working as intended and not a bug.
Do you have a PR open in relation to the work you're talking about? What else does it impact?
Thanks for your contributions, as always!
@Saijin-Naib The oldest in limbo, not the optimisation one. I also have my own build with my two PR in limbo that I use a work to generate maps using fully functional(as I want them to be) legend expressions.