lasan13 Posted April 11, 2011 Share Posted April 11, 2011 HI guys Im developing Health site using PHP and mysql. I want to create graphs from using data in the database on weekly basis. so please tell me what is the best method of creating graphs and charts in php thank in advance Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/ Share on other sites More sharing options...
QuickOldCar Posted April 11, 2011 Share Posted April 11, 2011 Usually graphs are made in php using the gd library. http://php.net/manual/en/book.image.php Here's a simple code to make a graph using gd http://code.web-max.ca/image_graph.php Here's a perl module which also uses gd. http://search.cpan.org/~mverb/GDGraph-1.43/Graph.pm Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/#findComment-1199928 Share on other sites More sharing options...
QuickOldCar Posted April 11, 2011 Share Posted April 11, 2011 For the second graph example..I would destroy the image at the end or will use lots of memory. Place this on the last line imagedestroy($im); Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/#findComment-1199931 Share on other sites More sharing options...
fatlog Posted April 12, 2011 Share Posted April 12, 2011 in my opinion you could be better off using a plugin such as ChartDirector Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/#findComment-1200479 Share on other sites More sharing options...
QuickOldCar Posted April 12, 2011 Share Posted April 12, 2011 Although chartdirector is nice, it comes with a price, 750 bucks to be exact. One year on the upgrade. I have always been the type of person to go the free way instead. Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/#findComment-1200618 Share on other sites More sharing options...
fatlog Posted April 13, 2011 Share Posted April 13, 2011 yeah. though theres an evaluation version you can mess around with. another option is jpgraph. havent used it in a while but it does the trick. doesn't look as pretty as ChartDirector though Link to comment https://forums.phpfreaks.com/topic/233329-charts-and-graphs-for-php-websites/#findComment-1201026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.