Re: Making graphics

From: Date: Thu, 11 Apr 2002 18:27:13 +0000
Subject: Re: Making graphics
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-92631@lists.php.net to get a copy of this message
Maybe I don't understand the question but if you're calculating the percentage in PHP then why not simply echo that percentage to the WIDTH attribute of a table in HTML? You could do something like this to make it look clean. <!-- begin bar graph template --> <table width="100%" cellpadding="0" cellspacing="3" border="0"> <tr> <td>Question #1 (<?echo $votes_question1?>) : </td> <td> <table width="<?echo $percent_question1?>%"> <tr> <td bgcolor="red"><img src="blank.gif" height="10"></td> </tr> </table> </td> </tr> </table> <!-- end bar graph template --> GD library is the only way to do true graphics in PHP but why do that when HTML tables are ideally suited for displaying the same type of information? Just a thought. -Kevin ----- Original Message ----- From: "Ian" <ian.ferger@solveris.com> To: <php-general@lists.php.net> Sent: Thursday, April 11, 2002 11:56 AM Subject: Re: [PHP] Making graphics > modifying the width or height of an image in javascript works well also....i > cant imagine why youd want to do this serverside.... > > > "Christoph Starkmann" <kiko@nfq.de> wrote in message > news:B120D7EC8868D411A63D0050040EDA77111BEE@XCHANGE... > > Hi Ron! > > > > > Here is what I want to do..... > > > > > > I am taking a poll and I would like to display the results in > > > a bar graph > > > format. What is the best way to do this.....hopefully you > > > will not say GD > > > library! > > > > If you don't like GD, why not try Flash instead? ;)) > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#92631) next »