10

I made a column representation in QGIS, which shows the effects on different points around point 24.

Is it possible to label the columns on top with the unit as you are used to from excel?

QGIS-Image:

enter image description here

Excel-Image:

enter image description here

7

I've tested some options (QGIS 3.10). It's not really straight forward, and you will need to write quite a few expressions, with some math involved.

  1. Diagram size need to be in "Map units" (also in rendering). Bar length is then used as a base for a lot of expression values later.

  2. You need to "place" the diagrams with "overrides" (easiest with a points layer) based on the geometry. enter image description here

    The expressions need to consider the diagram dynamic size. This is fractions of the bar length and bar width.

  3. Create a copy of the layer without diagram. Use one copy for each label. enter image description here

    Use data defined placements for each label, also based on the diagram size and defined placement using the geometry. Think of it as moving each label from the geometry to the correct location using the placement and size of the diagram, if that helps as an explanation.

In the end you will get something like this: enter image description here

If you don't want to use "Map units" then you can use "offset" and data defined overrides for the x,y offset. enter image description here

This may actually be easier, but it's your choice. However, note that screen x,y is measured from top left, and coordinate x,y from bottom left. This means your "y" offset will be inverted compared to using "Map units".

  • Alright, thanks for your help, this is pretty complicated so i´ll be better off with a later rework in PowerPoint or Gimp. But if you have to change the zoom multiple times for different images, this is the way to do it... – Philipp B. Feb 17 at 7:03

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.