[GIS] How to display only one pie chart for polygon features in QGIS

diagrampolygonqgis

I'm working with Qgis on a project and I have a small problem.
I have to do some demographic research and therefore I have a .shp file from a given country with 10 districts for example.

Now, I know how to insert pie charts but the problem is that I only want to insert one pie chart for one district because this area is of importance to me for example.

So I added a column in the attribute table with data for the district that I want to display and left all the other values 'NULL'.

However, if I insert pie charts, they appear for all the districts, even though I've not inserted any values in the attribute table for the other 9 districts that are of no interest to me.

Does anybody know how I can only display one pie chart for 1 feature of the polygon instead of having 1 good pie chart and 9 empty on the map?

Best Answer

You can selectively display features in a layer using the 'query' function.

  1. Right-click on the layer and select 'Query...';
  2. In the "SQL where clause" box, use the column name that has your district name in it (e.g. "name") and enter a search clause that will find that district (e.g. 'testdist'): name LIKE 'testdist'
  3. Click 'OK' and the layer will now display only the pie chart for district.

If you want to display the other features, you should add another duplicate layer based on the same data.

There's a good overview on querying here.

Related Question