Ticket #3232 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Changed 3 years ago by tamas

  • cc dmorissette added

Changed 2 years ago by tbonfort

  • status changed from new to closed
  • resolution set to fixed

should be fixed with the new rendering pipeline (we don't use gdImageArc anymore)

Note: See TracTickets for help on using tickets.