[Qgis-user] Print Legend as Features of a Layer

Phil Wyatt phil at wyatt-family.com
Sun Nov 29 02:41:10 PST 2020


Hi Walt.

 

Sounds like your layer uses a ‘single symbol’ for the layer styling. Try changing it to use Categorized and then use an expression like

 

"NAME" || ' - '  || "Area(ha)"  || ' ha'

 

Where 

*	NAME is the name field in your layer
*	Area(ha) is a field in your layer

This will then produce something with a label like

 

CS001 - 1.826 ha

 



 

Then add a legend for the layer in composer and it should show up like the following

 



 

 

The alternative is to add the attribute table rather than a legend

 



 

Cheers - Phil

 

 

 

From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of Walt Ludwick
Sent: Sunday, 29 November 2020 9:17 PM
To: QGIS User <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Print Legend as Features of a Layer

 

I've got a Polygon layer whose features are a series of contiguous LandPlots, and i want to print a map of same with a Legend that lists each LandPlot by name, along with its calculated area.

 

My problem is: the Layout Composer in QGIS 3.14 seems to presume that one wants a list of Layers for the Legend -and, tho i can filter that list down to just the single "LandPlots" Layer that i want, i cannot get it to list the features within that Layer. 

 

Have read the docs on this feature <https://docs.qgis.org/3.16/en/docs/user_manual/print_composer/composer_items/composer_legend.html> , which doesn't tell me how to solve this problem, unless i'm missing something -perhaps implicit in this "filter by expression" feature, which calls for more code-savvy than i've got on the ball right now <:-(

 

Am at an impasse, so any suggestion at this point would be most appreciated!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201129/06761de4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 31114 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201129/06761de4/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3735 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201129/06761de4/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 8527 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201129/06761de4/attachment-0005.png>


More information about the Qgis-user mailing list