1

I have a shapefile layer with R,G,B fields and used the following expression to set the symbol color. enter image description here

Surprisingly, it worked right away. However, even though the colors are applied in the canvas, they are not reflected in the legend. If I select categories instead of single symbol,the result is the same: the symbol colors doesn't match. I would like to know if there's some efficient way to to get the correct colors for the legend symbols.

enter image description here

Here's a video that shows the process: https://streamable.com/2l35dc

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
pr_
  • 53
  • 4
  • That's the expected/intended behaviour - QGIS does not automatically generate categorised symbols in the legend when you use a data-defined override. I believe the only way to efficiently generate all the legend symbols is to use Python, such as in this answer: https://gis.stackexchange.com/questions/371465/use-colums-in-attribute-table-to-set-colors-and-line-thickness-directly-automati/371494#371494 (where rgb is stored in one field). – she_weeds Jan 14 '24 at 03:49

0 Answers0