GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 03-Mar-2007, 00:31
ctrohaya ctrohaya is offline
New Member
 
Join Date: Nov 2006
Posts: 29
ctrohaya is on a distinguished road

creating graph using php


how to create graph in php programming using data located in mysql dbase....
  #2  
Old 07-Mar-2007, 01:49
davethedork davethedork is offline
New Member
 
Join Date: Mar 2007
Posts: 11
davethedork is on a distinguished road

Re: creating graph using php


You will likely want to look into the graphing functions of GD. What is it that you would like to graph?
  #3  
Old 13-Mar-2007, 04:24
ctrohaya ctrohaya is offline
New Member
 
Join Date: Nov 2006
Posts: 29
ctrohaya is on a distinguished road

Re: creating graph using php


Quote:
Originally Posted by davethedork
You will likely want to look into the graphing functions of GD. What is it that you would like to graph?
i want to graph some data from database.
now i already found how to create graph(GD) but i dont know how to use data from mysql.
below is the data that used in graph.
$array = array(68, 90, 55, 89, 77, 66);
but how to retrieve data from db instead of the value of $array?
  #4  
Old 11-Apr-2007, 23:08
camp185 camp185 is offline
New Member
 
Join Date: Sep 2006
Location: San Jose, CA
Posts: 6
camp185 is on a distinguished road

Re: creating graph using php


What kind of graph do you need. You can do a simple one like this easy enough: http://www.apopularitycontest.com/display_poll.php?ID=257

I use 1 small image, and use the results of db to adjust it's width.

Can't post the exact link yet, but just go to any poll on my site to see.
  #5  
Old 15-Apr-2007, 22:07
realmetrics.com realmetrics.com is offline
New Member
 
Join Date: Apr 2007
Posts: 8
realmetrics.com is on a distinguished road

Re: creating graph using php


Ctrohaya, use the code below or modifiy as needed

Code:
<?php include 'Image/Graph.php'; $Graph =& Image_Graph::factory('graph', array(600, 300)); $Plotarea =& $Graph->addNew('plotarea'); $Dataset =& Image_Graph::factory('dataset'); $Dataset->addPoint('Jan', 5); $Dataset->addPoint('Feb', 13); $Dataset->addPoint('March', 10); $Plot =& $Plotarea->addNew('bar', &$Dataset); $Plot->setLineColor('green'); $Plot->setFillColor('cadetblue'); $Plot->setBackgroundColor('green@0.1'); $Graph->done(); ?>

For More Information. http://www.zend.com/zend/spotlight/code-gallery-wade1.php

http://www.realmetrics.com - Metrics you can count on
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help ! I need help starting up on Php ! onauc MySQL / PHP Forum 11 04-Jan-2005 23:57
XML feed into PHP graph Darksat MySQL / PHP Forum 2 27-Sep-2004 09:33
uisng php to display php dopee MySQL / PHP Forum 6 14-May-2004 18:40
php software dopee MySQL / PHP Forum 0 04-May-2004 11:26
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 08:32.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.