Login   Register  
PHP Classes
elePHPant
Icontem

Love the class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Google Graph  >  All threads  >  Love the class  >  (Un) Subscribe thread alerts  
Subject:Love the class
Summary:trying to play with it now.
Messages:4
Author:Marcus Eby
Date:2008-01-10 09:07:56
Update:2009-03-30 05:18:55
 

  1. Love the class   Reply   Report abuse  
Picture of Marcus Eby
Marcus Eby
2008-01-10 09:07:58
Wondering if you have any code for the little pie charts you made.

The line charts have far too much data and don't show how you kept the size around the chart. (using the directions you gave in your dox, the pie chart always takes up more space than the labels)

Rid...

  2. Re: Love the class   Reply   Report abuse  
Picture of Ryon Sherman
Ryon Sherman
2008-02-18 03:38:12 - In reply to message 1 from Marcus Eby
First off I would like to thank you for bringing this up. It made me realize I didn't have a way to add labels to a pie chart. Doh! The class has been updated to implement these using the addPieLabel(array()) function.

Now the answer to your question: When using labels on a pie chart you need to make sure the width is large enough to display the labels. By default the size is set to 300x300 but when set to 440x200 using setSize(width,height) the labels are clearly displayed.

I hope this answers your question but if I misunderstood please post more info. I made this class on a whim and with the hundreds of lines of code I have to spit out at work I rarely feel like coding more when I get home. So If it takes me awhile to update the class or answer questions I apologize. I'm doing the best I can.

Here is a quick example of a pie chart using labels:

<?php
require_once('GoogleGraph.php');

$graph = new GoogleGraph();

$graph->Graph->setType('pie');
$graph->Graph->setSubtype('3d');
$graph->Graph->setSize(440,200);

$graph->Data->addData(array(5, 10, 58, 95));
$graph->Graph->addPieLabel(array('test1', 'test2', 'test3', 'test4'));

$graph->printGraph();
?>

  3. Re: Love the class   Reply   Report abuse  
Picture of Marcus Eby
Marcus Eby
2008-02-18 09:44:26 - In reply to message 2 from Ryon Sherman
Thanks Ryon.

I love the class, but I found that it was missing the pie functionality, and not being one to wait too long. I decided to go ahead and learn more about googles chart api, and your class. <grin>

So I eventually created my own class for the pie charts.

But like me, I'm sure you get swamped, so the fact you made any changes is awesome.

So I'll check out your class changes. You've done great code, so I'd like to see what you've done.

Thanks again. :-)

Rid...

  4. Re: Love the class   Reply   Report abuse  
Picture of Sonia Galvis
Sonia Galvis
2009-03-30 05:18:55 - In reply to message 2 from Ryon Sherman
Hello I am doing a work with this tool, and my problem is that I want to bring to the array information of mysql and not since it helps please