View unanswered posts | View active topics It is currently Sat Apr 20, 2024 2:12 pm



Reply to topic  [ 3 posts ] 
Two charts or more on one page? 
Author Message
Experienced pChart user
Experienced pChart user

Joined: Mon Jun 20, 2011 2:37 pm
Posts: 21
Post Two charts or more on one page?
Is this possible? When I try to include another graph I get an error in my logs that states cannot redeclare class pDraw.

Mike


Thu Jun 23, 2011 3:01 pm
Profile
pChart Guru
pChart Guru

Joined: Sun Jun 19, 2011 6:36 pm
Posts: 52
Post Re: Two charts or more on one page?
You may just place the charts in different php files and then insert them by img tags (works as well with php files with images in them)

_________________
Hope I helped :)
Image
If I helped, say thanks, so that I can see that my work isn't useless.


Fri Jun 24, 2011 8:04 pm
Profile
Experienced pChart user
Experienced pChart user

Joined: Tue Aug 02, 2011 11:49 pm
Posts: 34
Post Re: Two charts or more on one page?
another solution (using same style for 6 series in 3 charts) is to include the classes
pData.class.php
pDraw.class.php
pImage.class.php
in the final page which will be published

in another page I let draw my chart
the chart is rendered as flat image to a directory
series-arrays, labels etc. and the destinaton (path/filename) are defined as variables

the final page imports needed data from file
the chart-rendering page is included 3 times after changing the variables for each include

a simple echo command inserts an img-Tag for each picture before the next include is called


Thu Aug 04, 2011 10:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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