Friday, May 7, 2010

Google Chart Class

Goog Chart Class

This page show examples of GphpChart class usages.
  • Thanks to Google for a nice, fast, and easy-to-use API : Google Chart API
  • There are some limitations to it (who said "labels positions" ? :) ) but it's worth most of the commercial classes anyway.
  • I am not Google officiel or whatsoever, just a freelance developer and SEO
  • This class is officially in eternal beta : no garanties (it works, though), no cashback (it's free anyway), no extensive support (but the doc is simple)
  • I expect Google to update his API in the next few months, so stay tuned

Terms of Use

  • This class is free for you to use, and all Google Chart API terms applies (whatever they are)
  • A feedback about your usage, and some cool graphs are most welcome
  • A link back to this page is appreciated, somewhere on your site

Why use GphpChart class ?

My chart
  • Easy to use within your PHP backend or website
  • Cache images: don't break the API limit ( 50 000 calls a day ) by requesting the same image twice.
  • Example usage: http://chart.apis.google.com/chart?cht=lc&chd=t:8.3,16.7,25,33.3,41.7,50,58.3,66.7,75,83.3,91.7,100|69.2,20,81.7,1.7,45,72.5,81.7,54.2,72.5,45,45,72.5&chtt=My+pretty+chart&chs=300x200
  • You set :
    $lc1 = $array;
    $GphpChart = new GphpChart("lc");
    $GphpChart->title = "My chart";
    $GphpChart->add_data($lc1);
    echo $GphpChart->get_Image_String();
  • Which shows the image on the right
  • Emulates 95 % of the API functions

1 comment:

  1. I have not used Google chart, but I am a big fan of Quinn Curtis Dlls for any graphical representation of data. It may take some time to get a hang of this though.

    ReplyDelete