Feature request #13974
Expression for Map Composer Legend
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||21988|
The ability to use an expression for the legend text.
For certain very large shapefiles, with 1000's of features, it is ideal to use a categorized render style, that colors features based on a major attribute. For instance, the geology of an entire province could be styled based on rock type, ie. granite, shale, etc.
However when composing a map of a much smaller area within the province, it is necessary to indicate each local rock units (feature) name (ie. the Guichon Granite, the Bob Shale, etc) in the legend.
The ability to use an expression for the the legend text in composer would solve this, by allowing the legend to reference a different attribute in the shapefile (ie legend text ="UNIT NAME", while using a categorized style where column = "ROCK TYPE"). This would work in conjunction with the "Filter legend by map content" function. The features on the map can be labelled with a code attribute for reference.