Example 1
CASE WHEN "value" = 'value1' THEN '#ff0000' ELSE '#ffff00' END
Fill all polygons with value = value1 in red and all the rest in yellow
Example 2
CASE WHEN "value" = 'value1' THEN '#ff0000' WHEN "value" = 'value3' THEN
'#ffff00' END
Fill all polygons with value = value1 in red and with value3 in yellow
(all the rest is filled in black as no ELSE is defined)
Bernhard
Am 23.07.2014 12:03, schrieb Julian Schall:
Hi,
maybe a simple question, but I couldn’t find the answer on my own: How
can I automatically change the color of polygons by the content of an
attribute table column?
For Example: Polygonlayer with 3 objects. Object 1 and 2 have “value1”
in the column “value” and object 3 has “value3” there. Now QGIS should
fill polygon 1 and 2 in one color and polygon 3 in another.
I tried it with data-defined propertiesàcheck color and choose “value”
for field but then all polygons are black. Do I have to write a special
expression?
Thanks for help!
Regards
Julian
__________ Information from ESET Mail Security, version of virus signature
database 10140 (20140723) __________
The message was checked by ESET Mail Security.
http://www.eset.com
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user