QGIS 2.12.0 Lyon

I have an object with the following attributes:

  • shape [QString] ...circle, square
  • size [integer] ...8, 10
  • color [QString]

With the widget value map I fill these fields according to csv files. My color file looks like:


I did a rule-based style and on the map canvas it just looks like it should. But the colors in legend (TOC) are the predefined colors from the page "rule properties". What am I doing wrong?

enter image description here

  • Maybe you could add a screenshot of your rule-based styles window.
    – wiltomap
    Jan 22, 2016 at 9:32
  • It let me suppose bad things. Do I have create for each combination a diffrent rule? So it did not automatically add the properties like on the canvas to the TOC.
    – Rupicolous
    Jan 22, 2016 at 11:03
  • What kind of data is stored in the farbe attribute? RGB string or full color-name?
    – wiltomap
    Jan 22, 2016 at 12:31
  • Attribute farbe is the same as color from the example above. So i insert an rgb-string from my color.csv file.
    – Rupicolous
    Jan 22, 2016 at 12:51
  • OK. Then, I see no other solution than setting up rules one by one for each combination...
    – wiltomap
    Jan 22, 2016 at 12:52

1 Answer 1


Short answer: That's currently not possible.

There have been discussions about how to automatically create legends for data-defined styles. There's a solution for data-defined size but none for data-defined color so far. I assume funding would be necessary since it's not a trivial issue.

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.