[QGIS-Developer] setDataDefinedProperty() for color doesnt work for QgsSvgMarkerSymbolLayerV2

Nyall Dawson nyall.dawson at gmail.com
Thu Dec 13 14:23:47 PST 2018


On Thu, 13 Dec 2018 at 23:35, M S. <msel.mobicom at gmail.com> wrote:

> ddpColor= QgsDataDefined( True, True, "CASE WHEN DATA % 3 = 0 then  color_rgb( 255,0,0) WHEN DATA % 3 = 1 then  color_rgb( 0,255,0) WHEN DATA % 3 = 2 then  color_rgb( 0,0,255) END" )

If you change this to expression to:

CASE WHEN "DATA" % 3 = 0 then  color_rgb( 255,0,0) WHEN "DATA" % 3 = 1
then  color_rgb( 0,255,0) WHEN "DATA" % 3 = 2 then  color_rgb(
0,0,255) END

does it help? (i.e. enclose the DATA column name in " )

Nyall


More information about the QGIS-Developer mailing list