I created a legend with refinement in QGIS print composer. As you can see (picture 1) in the item properties for the legend the items are hierarchical indented.

picture 1 picture 1

But in my map the indentation is not taken from QGIS (see picture 2).

picture 2 picture 2

How can I manage this indentation in the legend?

  • How did you get the classified symbol and label to indent in the layer panel (in picture 1)?
    – artwork21
    Dec 30 '16 at 13:21
  • This could be done within the layer properties (style). I first did a rule based classification using the year and then I refined this classification for 2016 with an additional collumn called project. When I create the legend in the print composer it looks like in picture 1 within the item properties. But it does not take it for the map...
    – parallax
    Dec 30 '16 at 13:27

The answer to "why" is that nobody has implemented a print composer legend that reflects nested rules of a rule-based layer style.

I couldn't find a feature request for this on the QGIS bug tracker with a quick search. For more info on how feature requests are handled, see How to effectively get things changed in QGIS?


One option to get that indentation look would be to add three or more legends to the composer. First legend remove all classes after "2015". Add second legend, remove all classes from 2013-2015 and below Saxifraga Project. Then nudge this second legend over to the right to represent the indentation effect. Finally, add in the third legend, remove all classes from Saxifraga Project up and align this legend with the left edge of the first legend. A bit of a hack but this should mock how it shows in the layer panel.

  • yes, that could be one way (I already thought about this), but I am wondering why the formatting form item properties is not represented the same way as in my map legend? Shouldn't they do this?
    – parallax
    Dec 30 '16 at 13:44
  • I'm not sure about that aspect, maybe someone else can provide those details.
    – artwork21
    Dec 30 '16 at 14:15

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.