Skip to content

Commit

Permalink
allow pie charts with a single/no class if expressions given
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Apr 29, 2012
1 parent 572770e commit 185f3fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapchart.c
Expand Up @@ -590,7 +590,7 @@ int msDrawChartLayer(mapObj *map, layerObj *layer, imageObj *image)
return MS_FAILURE;
}

if( layer->numclasses < 2 ) {
if( layer->numclasses < 2 && !layer->class[0]->expression.string) {
msSetError(MS_MISCERR,"chart drawing requires at least 2 classes in layer", "msDrawChartLayer()");
return MS_FAILURE;
}
Expand Down

0 comments on commit 185f3fb

Please sign in to comment.