Ticket #3232 (closed defect: fixed)
Rounding problem when rendering pie charts with GD
|Reported by:||tamas||Owned by:||sdlime|
|Component:||MapServer C Library||Version:||unspecified|
I've run into an issue when rendering a pie chart with the following values:
value1 = 89334182.007166 --> color:blue value2 = 521709.219345 --> color:red value3 = 28923.37647 --> color:yellow
the whole pie is rendered as yellow which is incorrect in this case.
This problem is related to the following lines in mapchart.c (ln 277)
angle*=360.0/dTotal; When rendering value3 angle=0.11584176 therefore gdImageFilledArc gots the same value of '(int)start' and '(int)(start+angle)' and redraws the chart with yellow color.