I would like to make a legend to a map in qGIS 3.18 using proportional symbology based on an integer field. When I go to Layer Properties -> Symbology -> Advanced -> Data-defined Size Legend, I get an error message saying "Data-defined size is not enabled!". Would anyone have any ideas what could be the reason?

Data-defined size is not enabled error

2 Answers 2


The reason is that you are not using a data defined size. You are using a graduated size renderer.

To use the data defined size legend as you show in your image, choose another option than graduated size, e.g. graduated color, single symbol, categorized, ... Then click on symbol and on the small box right of "size" option:

enter image description here

Enter your expression or use the assistant. Now you can use the "Data defined size legend".

  • Thank you, it seems I didn't understand what "data defined size" means. It works perfectly now!
    – Paul
    Apr 1, 2021 at 17:51
  1. Set the Layer Styling to Graduated
  2. Select the real or integer field in Value to scale the symbol
  3. Use the expression editor next to Value to modify the size (scale, offset, etc.)

The legend should update on both the map legend and the printable map layout legend.

The option you refer to does not work on Mac under 3.18 either. No reference to enable data-defined size was found in Settings->Advanced or elsewhere. It would be good to now what this is meant to do, but it may not be necessary if the solution above is effective for you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.