1

I want to create an atlas legend with the option "Only show items inside current atlas feature". This works fine.

But for the legend title I want a black background. So far, I used a separate item for the title. When selecting the atlas features dynamically, the legend width is changing as well.

Is there a variable such as width that I could use as width for the title element? Or could I draw only the legend title background black?

2

You can set a fixed width for the legend, just make sure it is as big as the largest extent that it will dynamically be.

This is set using the Data defined override for Width in the Position and size of the Legend Item Properties.

enter image description here

Choose edit and then type in a number. If you just type it in (without the data defined override) it just gets overwritten.

Other than that I don't think there is a better way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.