View unanswered posts | View active topics It is currently Fri Mar 29, 2024 3:56 pm



Reply to topic  [ 5 posts ] 
output graphs in loop 
Author Message
New pChart user
New pChart user

Joined: Tue Aug 09, 2011 2:14 am
Posts: 3
Post output graphs in loop
Hi, guys!

I have got a problem. I tried to output graphs in loop, but only the first graph is outputted.
How to solve my problem? =)
Code:
for ($i=0;$i<count($arr);$i++)
{
$MyData = new pData();
...

$myPicture->autoOutput("pictures/google_get".$poss_bd[$i].".png");
}


Tue Aug 09, 2011 2:25 am
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: output graphs in loop
Hi,

Is this script called from a web browser or a server command line?

JD.


Tue Aug 09, 2011 7:03 am
Profile WWW
New pChart user
New pChart user

Joined: Tue Aug 09, 2011 2:14 am
Posts: 3
Post Re: output graphs in loop
a server command line


Tue Aug 09, 2011 12:07 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: output graphs in loop
First I would advice to use the render() function to create the files (but it will not solve the issue):

Code:
$myPicture->render("pictures/google_get".$poss_bd[$i].".png");


Then you must ensure that your script isn't stuck anywhere and that the file name really change by adding some echos. There is no limitation on the number of charts generated by a script files. (I'm using a daemonized PHP script that generate hundred of pictures)

JD.


Tue Aug 09, 2011 12:32 pm
Profile WWW
New pChart user
New pChart user

Joined: Tue Aug 09, 2011 2:14 am
Posts: 3
Post Re: output graphs in loop
Yeah :D It works.
Thanks a lot =)


Tue Aug 09, 2011 1:29 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron