1

I have a QGIS version 2.18.18 map with pie-chart diagrams. The pie-chart maps display correctly in both QGIS-desktop and QGIS-server versions. The pie-chart classes are correctly displayed in the QGIS desktop layers panel.

However, when I request the legend from QGIS server using a getlegendgraphic request, the pie-chart colors are not drawn.

The getlegendgraphic request is formatted as follows:
http://qgis-server-host/cgi-bin/qgis/qgis_mapserv.fcgi?map=myproject.qgs&service=WMS&version1.3.0&request=getlegendgraphic&layer=cbsbevolking2017legenda&format=image/png

Images
Map with diagrams:
Map with diagrams

Pie charts defined with Layer-Properties->Diagrams->Assigned Attributes:
Layer diagram definition

The legend in QGIS-desktop layers panel:
QGIS legend in layers panel

QGIS server getlegendgraphic response (missing colored classes):
Server legend from getlegendgraphic request

Am I doing something wrong? Is this a bug? Is there a work-around?

1

problem (almost) solved in QGIS version 3.0.1

The layers panel in QGIS-desktop 3.0.1:
enter image description here

The getlegendgraphic from the QGIS-server 3.0.1:
enter image description here

For some reason the layer names are now duplicated. The getlegendgraphic request is now:

http://localhost/qgis/qgis_mapserv.fcgi.exe?map=myproject2.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&layer=kaarttotaal&format=image/png

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.