|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
bar chart, pie chart
hello,
i've succeed get the percentage for my application. How could I convert the result (percentage) into bar chart or pie chart.. tq very much.. |
|
#2
|
|||
|
|||
|
its probally easiest to do it as a bar chart, but if you want it as a image, you would have to use either GD or some other extension, or a java applet. But this would mean heaps of work!
|
|
#3
|
|||
|
|||
|
You could take a single bar gif and average your data to a percentage by dividing by the total and multiplying by 100 then use that bargif to convert the percentage into a width for the bar gif
$avg = $score / $total; $avg = $avg * 100; $width = $avg / 2; //Calculate width. 50 pixels = 100% so I divide score by two. Such as <img src="images/blahblah.gif" width="<?php print $width; ?>" /> |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > bar chart, pie chart |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|