Hi, Not sure what your're trying to obtain, or how to write mssql queries, but charts work when your data query returns rows that are of the form:
[geometry,attribute1,attribute2,attribute3,...] each pie slice is defined with a mapserver CLASS: CLASS NAME "attribute1" STYLE SIZE [attribute1] COLOR r1 g1 b1 END END CLASS NAME "attribute2" STYLE SIZE [attribute2] COLOR r2 g2 b2 END END -- thomas On Tue, Jul 3, 2012 at 12:59 AM, julia paredes <jap...@hotmail.com> wrote: > Hi all > > I want to create a pie chart for some data. The problem that I'm facing is > that i'm not getting any errors when I test the layer using shp2img; > however, I just get a white image. This is my mapfile: > > MAP > EXTENT -20037508 -20037508 20037508 20037508 > SIZE 400 400 > IMAGETYPE PNG > LAYER > NAME "Survey" > TYPE CHART > CONNECTIONTYPE OGR > CONNECTION "MSSQL:server=myserver;database=data;uid=me;pwd=key" > DATA "SELECT Option, COUNT(*) AS RESULT FROM Survey GROUP BY Option" > PROCESSING "CHART_TYPE=pie" > PROCESSING "CHART_SIZE=30" > STATUS ON > CLASSITEM 'Option' > CLASS > EXPRESSION '1' > NAME "one" > STYLE > SIZE [RESULT] > COLOR 255 244 237 > END > END > CLASS > EXPRESSION '2' > NAME "two" > STYLE > SIZE [RESULT] > COLOR 255 217 191 > END > END > CLASS > EXPRESSION '3' > NAME "three" > STYLE > SIZE [RESULT] > COLOR 255 186 140 > END > END > CLASS > EXPRESSION '4' > NAME "Four" > STYLE > SIZE [RESULT] > COLOR 255 186 0 > END > END > END > END > > > Any ideas of what could be missing in my mapfile? > > Thanks > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users