QGIS Symbology – Use Point Symbology Tools in Geometry Generator of a Polygon

geometry-generatorqgissymbology

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.

Best Answer

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

Related Question