Thank you it works :-)

On Thu, Nov 25, 2010 at 1:24 PM, Marcus Bointon <[email protected]>wrote:

>
> On 25 Nov 2010, at 11:26, Atif Musaddaq wrote:
>
> > for ($i = 0; $i < sizeof($name); $i++) {
> > $piChart->addDataSet(array($val[$i]));
> > $piChart->setLegend(array($name[$i]));
> > $piChart->setLabels(array($name[$i]));
> > //$piChart->setColors(array("ff3344", "11ff11", "22aacc", "3333aa",
> "3375bb"));
>
> You're replacing the data, labels and legends every time around the loop -
> you don't need the loop at all! Try this:
>
> $piChart->addDataSet($val);
> $piChart->setLegend($name);
> $piChart->setLabels($name);
>
> Marcus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Chart API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-chart-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-chart-api?hl=en.
>
>


-- 
Atif Musaddaq
Master in Media Informatics,
RWTH Aachen & University of Bonn,
Germany.
[email protected]

*”Design can be art. Design can be aesthetics. Design is so simple, that’s
why it is so complicated.” —Paul Rand*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to