2

I use the "Atlas" tool of QGIS 2.18 to generate maps of different districts of my "city" layer. The information shown inside every district are the name, a value for power, and a pie chart. When I change between the single maps of the atlas, I would like to have only the information shown, which are interesting for the special district. The information of the residual district should be hidden.

I already found a way to select only the district of interest by using $id = $atlasfeature for stile and label, but I can't hide the diagram...

Is there a way to do so?

enter image description here

3

For lables use Rule-based labeling (you already figure it out) similar way as in symbology (How to generate multiple maps where one highlighted attribute changes?) using $id = @atlas_featureid expression.

In case of diagrams it's bit a tricky because there isn't any direct rule-based option. But you can use this simple workaround based on defining size of diagrams:

In Diagrams tab, go to Size option and select Scaled size and as Attribute use case conditional like CASE WHEN $id = @atlas_featureid THEN 20 END, which define size only for atlas feature (other features will be left with no size). You also have to set Maximum value and Size (scale) values to get diagram of required size.

enter image description here

  • 1
    Thank you for support me on easter holiday^^ .... gues thats the egg I had to find :P... smart solution! – Ma Fo Apr 15 '17 at 7:47

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.