Hello all... I´m using this Steve Lime pie chart... It works great! But I´m wondering if its posible to do a bar graph in that way...
 
Thanks
 
Paul
 
 
-----------------
Search in the archive for pie chart. There was a nice example by Steve Lime end of 2004. See below.

Best regards,
Bart

Forwarded message:

Hi all: I was updating mapgd.c today to make use of GD functions that
appeared in GD 2.0.x. I made a small modification to the marker drawing
code for ELLIPSE symbols, specifically circles. Now if you specify a
style angle it is interpreted as a "pie slice". You can do things like:

  http://maps.dnr.state.mn.us/testing/charts/test.gif
  http://maps.dnr.state.mn.us/testing/charts/test.map

Since you can load an angle from an attribute (via ANGLEITEM) you can
build simple pie charts pretty easy. Only problem is it's hard to do
more than 2 colors, and the origin is always 0.

Assuming folks are ok with the modification (it's only 5 lines of code)
what about adding a STARTANGLE parameter? We could probably do some auto
computation of starting angles between styles so that multiple element
charts would be possible/easy to construct.

Steve

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

 

Reply via email to