podarum Posted July 13, 2009 Share Posted July 13, 2009 Hi, I'm trying to insert some graphs and charts from my SESSION data in my php pages.. and have no idea on how to start.. I read that I need a GD Library, but do I install it, where and how? to my root in the host???? Thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 13, 2009 Share Posted July 13, 2009 Step 1 is to figure out if it's already installed. Create a page with this:<?php phpinfo(); ?>and go to it. Look for a section called GD. If it's there, it's already installed. You can also use Imagemagick for some of the same things. Link to comment Share on other sites More sharing options...
podarum Posted July 15, 2009 Author Share Posted July 15, 2009 I just checked, and it's installed... but don't know if and how I can use my POSTED / SESSION variables as the chart data. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 15, 2009 Share Posted July 15, 2009 Well, it doesn't matter where the data comes from, data is data. You can either find a PHP chart class or something to build the chart, or you can design it yourself and use the GD functions to draw the lines and shapes and things. Link to comment Share on other sites More sharing options...
skaterdav85 Posted August 2, 2009 Share Posted August 2, 2009 I just discovered this.http://code.google.com/apis/chart/Its Google's Chart API. Way easier to use than the Php GD library, and it looks a whole lot nicer. Its a fast way to do dynamic charting. Justsomeguy, are there any drawbacks to using something like this versus the GD library or Imagemagick? Link to comment Share on other sites More sharing options...
Ingolme Posted August 2, 2009 Share Posted August 2, 2009 Google's API is just fine to use if you only want a pie chart. "Looks a whole lot nicer" only depends on how much time you're intending to spend working on your PHP GD application to make it look pretty.If there's anything that the Google API doesn't do that you require, then you can use one of PHP's image libraries. Link to comment Share on other sites More sharing options...
clonetrooper9494 Posted August 3, 2009 Share Posted August 3, 2009 I made this using PHP GD, didn\'t take me too long.If you want to go about making your own, here is a list of all GD related functions.Its pretty simple actually, just make a background, add some lines and rectangles, add some text, and tada, you have a graph to display data.EDIT: I got this error when trying to display that image: Sorry, dynamic pages in the tags are not allowedWhy do they block dynamic images/pages? Link to comment Share on other sites More sharing options...
Synook Posted August 3, 2009 Share Posted August 3, 2009 Just use .htaccess to redirect a .png (or whatever) to your .php page. They probably block them because validation is harder that way. Link to comment Share on other sites More sharing options...
Synook Posted August 3, 2009 Share Posted August 3, 2009 Just use .htaccess to redirect a .png (or whatever) to your .php page. They probably block them because validation is harder that way. Link to comment Share on other sites More sharing options...
skaterdav85 Posted August 3, 2009 Share Posted August 3, 2009 Google's API is just fine to use if you only want a pie chart. "Looks a whole lot nicer" only depends on how much time you're intending to spend working on your PHP GD application to make it look pretty.If there's anything that the Google API doesn't do that you require, then you can use one of PHP's image libraries.well the google api has more than just pie charts. they have bar graphs both vertical and horizontal, easy ways to have legends, line graphs, etc. I was pretty excited when i saw this haha. A quick easy way to get a sweet looking chart on your application! Link to comment Share on other sites More sharing options...
justsomeguy Posted August 3, 2009 Share Posted August 3, 2009 ExtJS has some pretty cool charts that use the YUI Flash chart API:http://extjs.com/deploy/dev/examples/#sample-4I set this up for a friend this weekend, my first time playing around with the charting. It wasn't too bad:http://labean.org/test/ Link to comment Share on other sites More sharing options...
skaterdav85 Posted August 3, 2009 Share Posted August 3, 2009 ExtJS has some pretty cool charts that use the YUI Flash chart API:http://extjs.com/deploy/dev/examples/#sample-4I set this up for a friend this weekend, my first time playing around with the charting. It wasn't too bad:http://labean.org/test/ nice. those do look really good! whats the best way to learn ExtJS? I want to try it now after seeing all the cool things you've done. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 3, 2009 Share Posted August 3, 2009 This is probably the best place to start:http://extjs.com/learn/Main_PageThere is a forum that gets a lot of use, but if you ask questions in the forum they generally expect that you've already gone through the API documentation and the examples. The tutorials section and community manual has a lot of good information in it, and the samples page has the source code for the samples they have there. It took me a few months to really become comfortable with it though, so unfortunately it's not a very quick process. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.