![]() |
Pie Charts In PHP
Ok well Orc i believe wanted a pie chart tutorial. SO here i go,
http://www.jooney.co.uk/php/piechart/pieChart/pie.php You can see the example above. It automatically adds pieces to the pie depending on how many items there are in an array and of course made it abit more interesting in having randomly changing slices :) first things first lets define the header information PHP Code:
PHP Code:
PHP Code:
Now lets create the image PHP Code:
PHP Code:
Now the rest is up to use its a very basic way of showing the values of the data. The way i did it was to make it so it didnt make the values appear off the bottom. PHP Code:
|
Nice tutorial, but I think he wanted a tutorial on how to make one that uses AA.
|
Oki i shall expand on this tutorial tomorrow with the solution to that also :P
|
nice tutorial.
|
Looks good so far but yes I'd like AA
|
Hmmm... Idk maybe it's just me, but I don't think the GD library in PHP does a very good job with images.
Good tutorial though! |
Quote:
|
What a coincidence, I just created a pie chart program much like that in vb.net, here is a pie chart it created
![]() This isn't as blurry as the PHP generated one, but still need anti-aliasing. I'll see if there is some generic way of doing it. |
| All times are GMT. The time now is 07:20 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0