I am using QGIS to visual health status of elderly in an elderly home, whether they have medical devices or not is one attribute that I am trying to visualize.

I have create the map using mapwindows, and use R to create a tab-delimited txt file to carry the medical device information (7 columns, 6 columns of 0 or 1, and one uid that will be used to join the bed layer in QGIS.

I used the diagram tab in the properties menu of the bed layer, and pie-chart is being used for visualization: if the elderly have 3 devices, the pie will be presented with 3 parts with 3 different colours. And strange things are visualized.

A majority of elderly do not have any devices (i.e. that should be straight zeros for the 6 column in the txt file). I support no pie chart should be visualized, but QGIS still show a solid pie using the last attribute I have inserted in the diagram tab of the properties menu.

I have tried to insert a csvt file to explicitly state that those medical device columns are integer, real, but it still fails. QGIS visual an attribute with value 0 as 1, if all of the attributes used for plotting are straight zeros.

2 Answers 2


You could filter the features where all values are NULL by adding a query string like

A + B + C + D + E + F > 0

where A to F are the six columns (numerical data type)

  • yea, this is a nice solution, if my dataset is static (no further column) and if I only have 1 map to manipulate. But I have 33+ maps and maybe I will have more than 6 columns. The manual batch work dun seems to be a very nice solution for me.
    – lokheart
    Oct 27, 2011 at 2:12
  • You will also have to adjust your pie chart settings in case you add additional columns. For 33 similar maps you should probably think about some more efficient handling. Maybe all you need to do is change the layer paths in the project file to create any of the 33+ solutions.
    – underdark
    Oct 27, 2011 at 6:32
  • Sorry, I dun quite get it, what do u mean?
    – lokheart
    Oct 27, 2011 at 13:44

That is a weird one lokheart! I was able to reproduce using QGIS 1.8 and 1.7.1 via OSGeo4W, but have no idea how to fix it. My guess is it's a bug, and you may want to take it to the QGIS Issue Tracker website.

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.