5

In a polygon layer I have a simple geometry generator to get the centroid centroid($geometry). Using this I would like to apply a Heatmap symbology or Graduated by Size symbology but this is only possible using a native point source.

enter image description here

There is no option to use Method --> Graduated by size (unless we convert to points). For example, if the data is points we can do the following

enter image description here

Is there a way to do this without creating a new dataset or virtual layer? Maybe a data overide on the size column. I am not sure what the calculation would be. I guess it would be to calculate the total and then apply a formula to generate the classification.

4
  • 2
    You can try the following expression scale_linear("phosphorus",minimum( "phosphorus"),maximum("phosphorus"),1,8) for marker size. Check the documentation : docs.qgis.org/latest/en/docs/user_manual/expressions/… Commented May 18, 2022 at 4:58
  • thanks -that worked. It doesn't show in the legend but scales the icons appropriately. Commented May 18, 2022 at 5:07
  • 2
    Use diagrams ;) Commented May 18, 2022 at 5:13
  • Never had a reason to try this before...it's really good as well. Thank you. Commented May 18, 2022 at 5:21

1 Answer 1

4

You can use the Diagrams tab for this. Go to Layer Pproperties > Diagrams, then:

  1. Choose a Pie Chart
  2. Add your value field to the attributes list
  3. Within Size menu choose "Scaled Size" with your value field as attribute. Find a suiting maximum value and scale (e.g. by clicking "Find")
  4. Already done the main part
  5. Style them as you like, choose a suiting positioning or add a nice legend.

enter image description here

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.