6

Does anyone know how to perform pie charts based on table values within QGIS and include them in the print outs?

  • 5
    "The only thing worse than a pie chart is lots of them" - Edward Tufte – radek Oct 17 '11 at 23:54
  • 3
    Radek: Agreed. But pie charts do have a useful place in data analysis and cartography when used judiciously. On a map, they become an effective "small multiple," which is something Tufte strongly advocates! – whuber Mar 14 '12 at 17:16
  • 1
    Agree with whuber. Pie charts can be ok, if they're used for comparison. See this map for a good example. The pie charts are better in this situation than the bars because the bars have no common baseline, and the area of the pie charts is easier to comprehend than the total area of the bar pairs. – naught101 Jul 16 '12 at 2:19
  • @naught101 nice example! – Kurt Feb 4 '15 at 6:58
8

Giovanni is right. I outline the process here: http://darrencope.com/2011/11/01/qgis-diagrams-pie-charts-for-symbols/

To create a diagram symbol, go to the properties for the layer in question, and click the “Diagrams” tab at the top, then check off “Display Diagrams” and set Diagram type to “Pie Chart.” You can also use “Text Diagram” but that’s another post!

You can set either a fixed size, or scale the size of the charts to an attribute value range. This is useful if you are wanting to use the size of the symbol to indicate a value, and the ‘slices’ to indicate percentages. In my case, I set the size to ’23’ and set it to scale between 0 and 30mm. This is arbitrary in my case, but you can play with it using your own data to see what works best for you.

At the bottom under “Attributes,” select each attribute you want to form a ‘slice’ of the pie, and click the ‘+’ on the right. Then select the next value, and click ‘+.’ Repeat until you are finished adding all values. In my case, I added attributes A, B, C, and D. I didn’t want to use the ID, so I left it out. You can set individual colours for each ‘slice’ here by double clicking the colour in the table. Here’s what my settings looked like:

enter image description here

4

Open the vector attributes and use the tool you'll find in the "diagram" tab.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

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.