qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.43k stars 2.98k forks source link

Option to disable offset of symbols in legend #47519

Open gioman opened 2 years ago

gioman commented 2 years ago

Feature description

It seems there are scenarios were a layer (i.e. a line one) needs an offset, eventually applied to different symbology classes/categories.

if the offset is small enough, the symbol in legend is still kind of acceptable, but not very nice as it does not align with the text (of course)

image

but as soon as the offset is above a certain amount (still small) the symbol in legend shows nothing

image

This also gives ugly legends in QGIS Server

image

An option to "disable" the offset just for the legend symbol would be very good for this cases.

Additional context

No response

thunderwilson commented 1 year ago

I had a similair problem.

I solved it by double-clicking on the symbol in the 'Legend Item Properties' in the Print Layout editor.

Check 'Custom Symbol' checkbox. This will let you add a custom symbol for the legend only.

image

By default it will copy the styling of the existing symbol. You can then drill down into the custom symbol settings and remove the offset.