Ticket #3232 (closed defect: fixed)
Rounding problem when rendering pie charts with GD
| Reported by: | tamas | Owned by: | sdlime |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | MapServer C Library | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | dmorissette |
Description
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.
Further information:
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.
Change History
Note: See
TracTickets for help on using
tickets.
