How to symbolize features with NULL values in graduated symbology?
As @MichaelMiles-Stimson already mentioned, there doesn't seem to be a way to symbolise NULL features. However, there is an alternative whereby you create a filter to force QGIS to treat NULL values as an integer such as 0. I've included an example where I created 3 simple polygons each with a certain value:
Here is the Graduated Symbology I used with the following command:
case when "Some_Value" IS NULL then 0 else "Some_Value" end
Hope this helps!
I know it has been answered, but just to give another option:
You can just leave the field with no filter or value (I know it works for CATEGORIZED or RULE BASED):
I'm using QGIS 2.10 and it works.
Similar to what other users have said, the best option is to use rule-based symbols. To avoid manually creating the rules:
- Change the symbol type to Graduated.
- Define the symbol column, colours, intervals etc. as per normal
- Change the symbol type from Graduated to Rule-based. The symbols defined in the previous step will be carried over. Click the add symbol button, and select ELSE. Change the style as appropriate. This ELSE symbol class will catch any values that haven't been symbolised already, including null values.
- Click OK. Null values will now be symbolised.
(Tested in QGIS 3.6.0)