I would like to label data entries with multiple fields (that is easy, using the expression editor) in QGIS 2.18. But I fail to alter the styling of the labels, so that say the colour of the label from one data field (e.g., in the first line) was different to the second label value (second line). An older answer had the standard solution (duplicating the layer, Two different colours in label) I am wondering whether QGIS 2.18 or even the up and coming 3.0 will have a solution.
-
Related: How to create a label combining different font sizes or types?– underdark ♦Jun 12, 2017 at 15:56
-
An answer to this question is now available here: Multi-labelling with different colors in QGIS 3.10 - gis.stackexchange.com/questions/353226/…– Val PMar 9, 2020 at 20:49
1 Answer
I am also interested in this solution, if any available.
Below is a way to use Text diagram
which may or may not gives you what you are looking for. It is a multiple-colored texts, but does not offer much flexibility.
Anyway, just for your thoughts.
-
Great, thanks! It will do, although it is not necessarily always useable. In particular, I will have to see if the white background can be set to transparent. Also, label collisions will have to be treated somehow. The problem with a two layer solution is that conflicts are hard to manage together. as far as I can tell.– MartinTJun 12, 2017 at 12:46